List

List methods are used to manage lists of parameters, pads ...: They enable the user to create lists, to add items to the list, to remove items from the list, to retrieve values from the list, to move elements of the list to another position, and to copy the content of a list into another one.

 
List.Size () : Integer
Method used to return the number of items contained in the list.
 
List.AddItem (Object: Objecttype, Index: Integer):VoidType
Method used to add an item to the list.
let list (List)
list.AddItem(PartBody\Hole.2 ,1)
list.AddItem(PartBody\Hole.3 ,2)
Message("#",list.Size())
 
List.RemoveItem (Index: Integer) :VoidType
Method used to remove an item from the list.
 
List.GetItem (Index: Integer) :ObjectType
Method used to retrieve a value/item from the list
 
List.ReorderItem (Current: Integer, Target: Integer ) :ObjectType
Method used to move an element of the list to a new position.
 
Copy (List: List) : List
Method used to copy the content of a list and paste it in another list.
 
List (Next: ObjectType, ...): List
Method used to create a list.
 
List.Sum (): Real
Computes the sum of the items contained in the list..
 
List.IndexOf (Element: ObjectType, StartIndex:Integer):Integer
Returns the index of a list item.
 
Compute()
Function used to compute the result of an operation performed on the attributes supported by the features contained in the list.
Example: List.1 .Compute("+","Hole","x.Diameter",Length.1) 
Where:
List.1 is the name of the list on which the calculation will be performed
+ is the operator used. (Supported operators are: -, min, and max.)
Hole is the type of the list items used for the calculation (to calculate the diameter, the type to be indicated is Hole, to calculate the volume, the type to be indicated is Solid)
x stands for the list items. Note that the type of the items contained in the list should be identical.
Length.1 is the output parameter.

 

Back Up Next