XSICollection.SetAsText

説明

スクリプトヒストリウィンドウに表示されているオブジェクトのstring path namesを使用して、コレクションを設定します。文字列リストはコンマ区切りです。文字列ではワイルドカードを使用できるので、多数のオブジェクトに一致させられます(例:"light*")。このメソッドを、XSICollection.Add(一度に単一のアイテムのみ追加)やXSICollection.AddItems(一度に1 つまたは複数のアイテムを追加)と比較してください。

スクリプト 構文

XSICollection.SetAsText( [Text] );

パラメータ

パラメータ タイプ 詳細
Text String list of itemsを参照)

VBScript の例

Dim oColl             ' object pointer for collection
Dim oMember             ' object pointer for members
' Create a bunch of grids 
NewScene , false
CreatePrim "Grid", "MeshSurface"
CreatePrim "Grid", "MeshSurface"
CreatePrim "Grid", "MeshSurface"
' Use wildcards to add everything starting with 'grid' to the new collection
Set oColl = CreateObject("XSI.Collection")
oColl.SetAsText "grid*"
For Each oMember In oColl
        Application.LogMessage oMember & " is in the collection list: " & oColl.GetAsText
Next
'--------------------------------------------------
' Output of above script:
' INFO : grid is in the collection list: grid,grid1,grid2
' INFO : grid1 is in the collection list: grid,grid1,grid2
' INFO : grid2 is in the collection list: grid,grid1,grid2

関連項目

XSICollection.Add XSICollection.AddItems XSICollection.GetAsText