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" |