XSICollection.GetAsText

XSICollection.GetAsText

説明

string expression としてコレクションを戻します。このメソッドは、コレクションの内容を、文字列表現としてしかオブジェクトのリストを受け付けないコマンドに渡す必要がある場合に、特に役立ちます。

C#構文

String XSICollection.GetAsText();

スクリプト構文

oString = XSICollection.GetAsText();

戻り値

String

VBScript の例

Dim oColl		' object pointer for collection

Dim oItem		' object pointer for member

' Create a collection as an ActiveX object

Set oColl = CreateObject("XSI.Collection")

' Populate it

oColl.Add "Camera"

oColl.Add "Light"

' See what kind of object it is

LogMessage "The whole collection is a " & TypeName( oColl )

' See what kind of return value GetAsText returns

LogMessage oColl.GetAsText & " is a " & TypeName( oColl.GetAsText )

' You can also return a single item as an object pointer

Set oItem = oColl.Item(0)

LogMessage oItem & " is a " & TypeName( oItem )

'--------------------------------------------------

' Output of above script:

'INFO : "The whole collection is a Object"

'INFO : "Camera,light is a String"

'INFO : "Camera is a Camera"

関連項目

XSICollection.Item XSICollection.SetAsText