EnumElements

Introduced

v1.0

Categories

selection edit property

Description

Returns the list of elements above or below a given element in the scene hierarchy.

Scripting Syntax

oReturn = EnumElements( InputObj, [EnumChildren], [Capabilities] );

Return Value

XSICollection

Parameters

Parameter Type Description
InputObj String The object to enumerate.
EnumChildren Boolean True to enumerate the children, FALSE to enumerate the parents.

Default Value: TRUE

Capabilities Integer Internal use only.

Examples

VBScript Example

LogMessage "Enumerating children......................", 8
RecursiveEnum "Camera_Interest.kine.local", TRUE, TRUE
LogMessage "Enumerating first parent..................", 8
RecursiveEnum "Camera_Interest.kine.local.posx", FALSE, TRUE
LogMessage "Enumerating all parents...................", 8
RecursiveEnum "Camera_Interest.kine.local.posx", FALSE, FALSE
sub RecursiveEnum( in_Comp, in_Type, in_FirstParentOnly )
        dim list, msg, elem
        set list = EnumElements( in_Comp, in_Type )
        if TypeName(list) <> "Nothing" then
                if in_Type then
                        msg = "Children of " & in_Comp & Chr(10)
                else
                        msg = "Parents of " & in_Comp & Chr(10)
                end if
                for each elem in list
                        msg = msg & elem & Chr(10)
                        RecursiveEnum elem, in_Type, in_FirstParentOnly
                        if (not in_Type) and (in_FirstParentOnly) then
                                exit for
                        end if
                next
                LogMessage msg
        end if
end sub

See Also

GetValue SIMatchSubComponent