GetChildObject [Modeler]

Returns a 3D modeler child object, which can be assigned to a variable. Will return normally if there are no active objects. For 3D Components and UDMs, these commands do not return parts, coordinate systems, plans, as top-level modeler children.

Note: This command is not supported by the EMIT and Circuit design types.
UI Access N/A
Parameters
Name Type Description
<object> String In this case, "3D Modeler".
Return Value Returns the 3D Modeler object. In the examples below, it is assigned to the variable oEditor.

 

Python Syntax GetChildObject(<object>)
Python Example

Standalone Example:

oDesign = oProject.GetActiveDesign()

oEditor = oDesign.GetChildObject("3D Modeler")

Example used in Conjunction with GetChildNames and GetPropNames:

oDesign = oProject.GetActiveDesign()

oModel = oDesign.GetChildObject("3D Modeler")

oModel.GetChildTypes()

  • This returns an array containing strings: "ModelParts", "AllParts", "NonModelParts", "CoordinateSystems", "Points", "Planes", "SubmodelDefinitions", "Groups", and "Lists".

oModel.GetChildNames("ModelParts")

  • This returns an array containing string model parts. For example: "WG_Interior", "WG", "MT_Interior", "MT", "Box2", "Cylinder1".

oWGi = oModel.GetChildObject("WG_Interior")

  • This sets the object WG_Interior to variable oWGi.

oWGi.GetPropNames()

  • This returns property names from child object assigned to oWGi. In this case: "Name", "Material", "Material/SIValue", "Material/EvaluatedValue", "Solve Inside", "Orientation", "Orientation/Choices", "Model", "Display Wireframe", "Material Appearance", "Color", "Color/Red", "Color/Green", "Color/Blue", and "Transparent".