3D Modeler Editor Script Commands
3D Modeler commands should be executed by the "3D Modeler" editor:
Set oEditor = oDesign.SetActiveEditor("3D Modeler")
oEditor.<CommandName>
Conventions Used in this Chapter:
<AttributesArray>
<AttributesArray> takes the following structure:
Array("NAME:Attributes",
"Name:=", <string>,
"Flags:=", <string>,
"Color:=", <string>,
"Transparency:=", <value>,
"PartCoordinateSystem:=", <string>,
"UDMId:=", <string>,
"MaterialValue:=", <string>,
"SurfaceMaterialValue:=", <string>,
"Solveinside:=", <boolean>,
"ShellElement:=", <boolean>,
"ShellElementThickness:=", <string>,
"IsMaterialEditable:=", <boolean>,
"UseMaterialAppearance:=", <boolean>,
"IsLightweight:=", <boolean>)
Where:
- Flags – Takes a string containing "NonModel" and/or "Wireframe", separated by the # character. For example, "NonModel#Wireframe".
- Color – Takes a string containing an RGB triple, formatted as "(<RGB>)". For example, "(255 255 255)".
- Transparency – Takes a value between 0 and 1.
- PartCoordinateSystem – Orientation of the primitive. The name of one of the defined coordinate systems should be specified.
- UDMId – Takes a string containing an ID.
- MaterialValue – Takes a string of the material name.
- SurfaceMaterialValue – Takes a string of the surface material name.
- Solveinside – Takes a boolean value.
- ShellElement – Takes a boolean value specifying whether or not a shell element is present.
- ShellElementThickness – Takes a string containing the shell element thickness. If element is not present, pass empty string.
- IsMaterialEditable – Takes a boolean value.
- IsLightweight – Takes a boolean value.
<SelectionsArray>
<SelectionsArray> typically takes the following structure:
Array("NAME:Selections",
"Selections:=", <string>)
Where:
- Selections – Takes a comma-separated list of parts on which to perform the action. For example, "Rect1, Rect2, Rect3".
In some cases, <SelectionsArray> takes additional parameters:
Array("NAME:Selections",
"AllowRegionDependentPartSelectionForPMLCreation:=", <boolean>,
"AllowRegionSelectionForPMLCreation:=", <boolean>,
"Selections:=", <string>,
"NewPartsModelFlag:=" , <string>,
"UseCurrentCS:=", <boolean>)
Where:
- AllowRegionDependentPartSelectionForPMLCreation – Takes a boolean value. See individual script for whether this parameter is required.
- AllowRegionSelectionForPMLCreation – Takes a boolean value. See individual script for whether this parameter is required.
- Selections – Takes a comma-separated list of parts on which to perform the action. For example, "Rect1, Rect2, Rect3".
- NewPartsModelFlag – Takes either string "Model" or string "Nonmodel". See individual script for whether this parameter is required.
- UseCurrentCS – Takes a boolean value. See individual script for whether this parameter is required. Use GetActiveCoordinateSystem to determine the current CS.
Selections is the only parameter required in all 3D Modeler Editor scripts. See individual scripts for additional required parameters.
Organization
3D Modeler editor scripts are organized into the following categories: