2014-11-12 16:04 UTC
Based on the examples of "Tree.lsp" I tried to create a tree "on_initialize" -> result: :'( :'(
I'm sure it is simple, but I can not figure it out. Here is the working fragment with "Parent - Child", but I'm not able to create "Parent - Child - Child":
(setq P10 (dcl_Tree_AddParent spdrs_Haupt_tree "Abbruch" 9 -1 9))
(setq P20 (dcl_Tree_AddParent spdrs_Haupt_tree "Betriebsartenstecker" 10 -1 10))
(dcl_Tree_AddChild spdrs_Haupt_tree
(list
(list P20 "a child" 4 5)
(list P20 "should be a parent from three children" 4 5)
)
)
(setq P30 (dcl_Tree_AddParent spdrs_Haupt_tree "Kondensator" 10 -1 10))
Other question:
Trees can be created "with lists" and "without lists". It seem to me that there is also another behaviour of the "uParentItems" and "strKey" - right?
; mode with lists and setq
(setq P20 (dcl_Tree_AddParent spdrs_Haupt_tree "Betriebsartenstecker" 10 -1 10))
(dcl_Tree_AddChild spdrs_Haupt_tree
(list
(list P20 "von oben" 4 5)
(list P20 "von unten" 4 5)
)
)
; -------------
; mode withOUT lists and setq
(dcl_Tree_AddParent spdrs_Haupt_tree "Kontakt hoch" "xx" 10 -1 10)
(dcl_Tree_AddChild spdrs_Haupt_tree
'(
("xx" "Öffner" "x1" 4 5)
("xx" "Öffner angezogen" "x2" 4 5)
)
)
I'm sure it is simple, but I can not figure it out. Here is the working fragment with "Parent - Child", but I'm not able to create "Parent - Child - Child":
(setq P10 (dcl_Tree_AddParent spdrs_Haupt_tree "Abbruch" 9 -1 9))
(setq P20 (dcl_Tree_AddParent spdrs_Haupt_tree "Betriebsartenstecker" 10 -1 10))
(dcl_Tree_AddChild spdrs_Haupt_tree
(list
(list P20 "a child" 4 5)
(list P20 "should be a parent from three children" 4 5)
)
)
(setq P30 (dcl_Tree_AddParent spdrs_Haupt_tree "Kondensator" 10 -1 10))
Other question:
Trees can be created "with lists" and "without lists". It seem to me that there is also another behaviour of the "uParentItems" and "strKey" - right?
; mode with lists and setq
(setq P20 (dcl_Tree_AddParent spdrs_Haupt_tree "Betriebsartenstecker" 10 -1 10))
(dcl_Tree_AddChild spdrs_Haupt_tree
(list
(list P20 "von oben" 4 5)
(list P20 "von unten" 4 5)
)
)
; -------------
; mode withOUT lists and setq
(dcl_Tree_AddParent spdrs_Haupt_tree "Kontakt hoch" "xx" 10 -1 10)
(dcl_Tree_AddChild spdrs_Haupt_tree
'(
("xx" "Öffner" "x1" 4 5)
("xx" "Öffner angezogen" "x2" 4 5)
)
)