Returns the parent (any object that derives from SIObject) of the object as follows:
If you call the Parent property on the scene root (Model), it returns itself.
If you call the Parent property on any other X3DObject, it returns the parent of the X3DObject.
If you call the Parent property on a Property, it returns the X3DObject that owns that Property.
If you call the Parent property on a Parameter, it returns the ProjectItem directly containing that Parameter. Note that often the ProjectItem.Parameters collection includes parameters that are actually contained inside children objects. For example an X3DObject may appear to have parameters that actually come from the Kinematics and other nested properties. For this reason the Parent property is very useful for determining where these parameters come from. This concept is demonstrated in one of the examples below.
If you call the Parent property on a geometry component (e.g. Point, Segment, or Facet) it returns the parent Geometry.
If you call the Parent property on a SubComponent, it returns the parent geometry because a SubComponent object contains references to geometry components (to get the actual X3DObject parenting the subcomponent, use SubComponent.Parent3DObject).
If you call the Parent property on a Cluster, it returns the parent Primitive.
If you call the Parent property on an Operator, it returns the target of the operator's first OutputPort.
If you call the Parent property on an ActionSource under a model, it returns that Model. If you call the Parent property on a SimulationEnvironment cache, it returns the SimulationEnvironment. This changed as of v5.0: in previous releases it was returning the Mixer object.
If you call the Parent property on an object that has no parent, like the Application object, it returns the object as parent.
Some simple objects like Command return the XSIApplication as parent.
Tip: Some objects may actually have multiple parents, such as a shared Material, in which case the same object appears at multiple places in the scene explorer and in the graph. In this case all the "parents" can be reached via the ProjectItem.Owners property.
Note: These is currently no equivalent property for finding all nested "children" of an SIObject. Instead these children are available in different collections depending on their type (for example, X3DObject.Children, ProjectItem.Parameters, ParticleCloudPrimitive.Particles, and X3DObject.Primitives). The EnumElements command is one way of finding all children without regard to the type.
// get accessor Object rtn = SIObject.Parent;
• See SIObject.Parent.1.vbs
• See SIObject.Parent.2.vbs
• See SIObject.Parent.3.pys
Autodesk Softimage 2011