ClusterElementCollection.FindIndex

説明

コレクションを、指定された項目について検索します。

スクリプト 構文

oReturn = ClusterElementCollection.FindIndex( Item );

戻り値

項目のインデックスを戻します。項目が検出されない場合は-1を戻します。

パラメータ

パラメータ タイプ 詳細
Item IntegerまたはArray クラスタエレメントの場合は Integer、clusterproperty エレメントの場合は Array

VBScript の例

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