Role: Collection of Object.
Properties
- Property Count() As (Read Only)
-
Returns the number of objects in the list.
- Example:
-
This example retrieves in NumberOfObjects the number of objects
currently gathered in MyList.
NumberOfObjects = MyList.Count
Methods
- Sub Append( iObject)
-
Adds an object to the end of the list.
- Parameters:
-
- iObject
- The object to be added to the list. dd>
- Example:
-
The following example appends an object to the list.
Dim MyObject As AnyObject Dim MyList As PspListOfObjects MyList.Append(MyObject)
- Func Item( iIndex, iInterfaceName) As
-
Returns an object from its index in the list.
- Parameters:
-
- iIndex
- The index of the first object in the collection is 1, and the index of the last object is Count. dd>
- iInterfaceName
- The interface name of oObj. dd>
- Returns:
- the retrieved object. dd>
- Example:
-
The following example returns in the third object in the list.
Dim MyObject As PspID Dim MyList As PspListOfObjects Set MyObject = PspListOfObjects.Item(3,"CATIAPspID")
- Sub RemoveByIndex( iIndex)
-
Remove an object from the list by specifying its position in the list.
- Parameters:
-
- iIndex
- The position of the object to be removed in the list. dd>
- Example:
-
The following example removes the second entry in the list. Please note that the list index starts with 1.
Dim MyList As PspListOfObjects MyList.RemoveByIndex (2)