## Cluster.FindIndex

### Description

Searches the cluster for the specified geometry index and returns the corresponding cluster index.

### C# Syntax

    Int32 Cluster.FindIndex( Object vItem );

### Scripting Syntax

    oLong = Cluster.FindIndex( Geometry index );

### Return Value

Returns the cluster index of the item as a Long, or returns -1 if the item is not found.

### Parameters

Parameter | Type | Description
--- | --- | ---
Geometry index | Integer | Geometry component index.

### Examples

#### VBScript Example

    set oGrid = ActiveSceneRoot.AddGeometry("Grid","MeshSurface")

    set oCluster = oGrid.ActivePrimitive.Geometry.AddCluster( siVertexCluster, "PointClusterOnGrid", array(0,3,9))

    for each oPnt in oGrid.ActivePrimitive.Geometry.Polygons(0).Points

    	indice = oCluster.FindIndex(oPnt.Index)

    	LogMessage "Cluster index for geometry index " & oPnt.Index & " is : " & indice

    next

### See Also

Cluster.Elements Cluster.FindIndices