FindIndex (ClusterElementCollection)
Description
Searches the collection for the specified item.
Scripting Syntax
ClusterElementCollection.FindIndex( Item )
C# Syntax
Int32 ClusterElementCollection.FindIndex( Object vItem );
Parameters
|
Parameter |
Type |
Description |
|
Item |
Integer for cluster elements and Array for clusterproperty elements |
Return Value
Returns the index of the item, or returns -1 if the item is not found.
Examples
VBScript Example
dim oRoot, oGrid, oCluster, indice
set oRoot = Application.ActiveProject.ActiveScene.Root
set oGrid = oRoot.AddGeometry("Grid","MeshSurface")
set oCluster = oGrid.ActivePrimitive.Geometry.AddCluster( siPolygonCluster, "PolygonClusterOnGrid", _
array(59,60,61))
indice = oCluster.Elements.FindIndex (59)
LogMessage "indice for 59 : " & indice
indice = oCluster.Elements.FindIndex (60)
LogMessage "indice for 60 : " & indice
indice = oCluster.Elements.FindIndex (61)
LogMessage "indice for 61 : " & indice
indice = oCluster.Elements.FindIndex (40)
LogMessage "indice for 40 : " & indice
SOFTIMAGE|XSI v6.01