Dim oColl ' object pointer for collection
Dim oMember ' for getting the first member
Dim oLight ' for getting the light
' Create the collection as an ActiveX object
Set oColl = CreateObject("XSI.Collection")
' Add some items to it
oColl.Add "Camera"
oColl.Add "Light"
' Get a pointer to the first member of the collection
' (using the index as key)
Set oMember = oColl(0)
getInfo oMember
' Get a pointer to the light (using the name as key)
Set oLight = oColl( "Light" )
getInfo oLight
function getInfo( in_object )
LogMessage in_object & " is a " & ClassName( in_object )
end function
'--------------------------------------------------
' Output of above script:
'INFO : "Camera is a Camera"
'INFO : "light is a Light" |