OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: stephan_35 on June 12, 2009, 01:56:18 AM

Title: dcl_Tree_AddChild without list
Post by: stephan_35 on June 12, 2009, 01:56:18 AM
Hello,

With old opendcl version, we can use dcl_Tree_AddChild with and without list ...

Quote
Method AddChild (Without Lists) as Long

This method adds a child tree item to a top level tree item or other child tree item. A child is a tree item that is connected to a parent or owner tree item. This method returns the long integer value of the new node item key.

Please note! Adding node items with String Keys attached to them can have expanded images. 

AutoLISP Syntax:
(Setq rValue (dcl_Tree_AddChild  boite
   ParentKey [as String or Long]
   Text  [as String]
   OptionalKey  [as String]
   OptionalImageIndex [as Integer]
   OptionalSelectedImageIndex  [as Integer]
   OptionalExpandedImageIndex [as Integer]))


Quote
Method AddChild (Using Lists)

This method adds a child tree item to a top level tree item or other child tree item.

Note:
Create list in the manor shown as follows:
          (List (List x y ...) (List x y ...) ...)
We have found ObjectARX does not always like lists created as follows:
         '(x y ...) (x y ...) ... 

Please note! Adding node items with String Keys attached to them can have expanded images. 

AutoLISP Syntax:
(dcl_Tree_AddChild  boite
   (list (list 
   ParentKey [as String or Long]
   Text  [as String]
   OptionalKey  [as String]
   OptionalImageIndex [as Integer]
   OptionalSelectedImageIndex  [as Integer]
   OptionalExpandedImageIndex [as Integer])
   ...))



With new OpenDCL V5x
Code (autolisp) Select

(dcl_Tree_AddChild boite(List of Lists as (ParentItem [as Handle or String] Label [as String] {Key [as String]} {ImageIndex [as Integer]} {SelectedImageIndex [as Integer]} {ExpandedImageIndex [as Integer]}) ...))


Will you give up working without list ????

Thanks for reply
Title: Re: dcl_Tree_AddChild without list
Post by: owenwengerd on June 12, 2009, 02:42:43 AM
The function should still accept either syntax. To make things simpler, only the more flexible form is documented.