CollectionItem.SubElements

説明

オブジェクトのインデックスの内部配列を設定したり、戻したりします。

注:この関数を使用して戻すと、昇順に並べられます。エレメントを現在の順序で戻すようにする場合は、CollectionItem.SubElements2を使用します。

VBScript の例

set oRoot = Application.ActiveProject.ActiveScene.Root
set oObject = oRoot.AddGeometry("Cube", "MeshSurface")
set oItem = CreateObject("XSI.CollectionItem")
oItem.Value = oObject.FullName & "." & siVertexCluster & "[*]"
logmessage "all components selected"
aIndices = oItem.SubElements
for i = LBound( aIndices, 1 ) to UBound( aIndices, 1 )
LogMessage "SubComponent[" & i & "] : " & aIndices(i)
next
logmessage "subset of components selected"
oItem.SubElements = Array(0,1,2,4,6)
aNewIndices = oItem.SubElements
for i = LBound( aNewIndices, 1 ) to UBound( aNewIndices, 1 )
LogMessage "SubComponent[" & i & "] : " & aNewIndices (i)
next