Tree Crawling
 
 
 

SIObject.NestedObjects Property (Object Model) and SIObject::GetNestedObjects Function (C++ API)

The SIObject.NestedObjects object model property and the SIObject::GetNestedObjects function return elements below the current object (ie., children). The nested objects returned by the function are scene objects such as Property, Parameter, X3DObject, etc.

Tip

To return elements above the current object (ie., parents), you can use SIObject.Parent or ProjectItem.Owners with the object model and SIObject::GetParent or ProjectItem::GetOwners with the C++ API.

EnumElements (Scripting Command)

The EnumElements command returns a list of elements either above or below the specified object. Normally, when you use one of the FindChild methods on a scene object, it only considers other scene objects underneath. However, EnumElements makes it much easier to crawl up and down the hierarchy because it treats properties and parameters like children.