Geometry
This container holds imported or generated geometry from an instance of DesignModeler.
The Edit command starts DesignModeler session, if it is not already running. If DesignModeler session is already running, this command brings the DesignModeler window in focus.
If a CAD file is assigned to geometry component, the file is loaded in the DesignModeler.
Available options:
| Interactive | This optional boolean type argument indicates whether DesignModeler is to be started in Interactive mode or batch mode. Its default value is True |
Optional Arguments
Required example does not exist.
Exit command shuts down the running session of the Geometry Editor. Before shuting down, the geometry is brought up-to-date generates the editor saves its database.
The editor session can not be closed if it is busy in generating features or seeking user's input. In such situations, this command throws an ApplicationBusyException exception.
The export command exports geometry data in running Geometry Editor to the location specified in its FilePath argument. The export file CAD format is deduced from the extension of FilePath.
Available options:
| FilePath | This argument points to the location where the exported file should be saved. The filename extension specifies the export file format |
The command throws following exception
| CommandFailedException | export file format is not supportedExport file location doesn't existsFile name contains invalid characters |
| ApplicationBusyException | When the editor is busy. |
Required Arguments
Suppose the geometry in the container "Geometry" needs to exported to IGES and STEP formats. This can be achieved by the following example.
geometry1 = GetDataContainer("Geometry")
geometry1.Export(FilePath="C:/Models/geometry1.iges")
geometry1.Export(FilePath=AbsUserPathName("Models/geometry1.step"))
Return a reference to DataEntity managing property settings of Geometry Container.
Return
Reference to DataEntity managing geometry properties
Refresh command refreshes the input data in a geometry component by consuming all changed data from upstream (source) components. This command also updates the modified parameters in the geometry editor.
After succesful execution of this command, the geometry component goes into "update required" state.
Optional Arguments
Executes a script in the assigned geometry editor, which must be running. SpaceClaim will accept Python (.py) and SpaceClaim Script (.scscript) files. DesignModeler will accept JavaScript (.js) or Python (.py) files.
Required Parameters:
| ScriptFile | Path of the script file to be run. |
Required Arguments
Optional Arguments
The SendCommand sends javascript or python command string to the Geometry Editor for execution. If the editor is not open, it will be launched to execute commands, and then closed. If editor is already running, it will keep running after the command execution.
If the editor is busy and not available for executing the instruction, the SendCommand throws an ApplicationBusyException exception.
Available options:
| Command | Javascript or Python command string containing scripting commands for the Geometry Editor |
| Language | Language of the command. Allowed values are: "Javascript" and "Python". The default language is "Javascript" |
The following command will add a sketch with an elliptical curve in the DesignModeler editor.
Required Arguments
Optional Arguments
system1 = GetSystem(Name="Geom")
geometry1 = system1.GetContainer(ComponentName="Geometry")
geometry1.SendCommand( Command = """var ps1 = new Object();
ps1.Plane = agb.GetActivePlane();
ps1.Origin = ps1.Plane.GetOrigin();
ps1.XAxis = ps1.Plane.GetXAxis();
ps1.YAxis = ps1.Plane.GetYAxis();
ps1.Sk1 = ps1.Plane.NewSketch();
ps1.Sk1.Name = "Sketch1";
with (ps1.Sk1) { ps1.El7 = Ellipse( 8.0, 10.0, 9.0, 6.0, 5.0, 12.0); }
agb.Regen();""")
Adds a Geometry file to the Geometry System. The file processed by the geometry editor.
Available options:
| FilePath | Path of the geometry file |
| PlugInName | PlugIn Name, in case of PlugIn mode geometry transfer |
Required Arguments
Optional Arguments
geometry1 = GetDataContainer("Geometry")
geometry1.SetFile("C:/Models/block.iges")
geometry2 = GetDataContainer("Geometry 1")
geometry2.SetFile(FilePath=AbsUserPathName("Models/block.prt.1"), PlugInName="ProEngineer[1]")
The Stop command shuts down the running session of of the Geometry Editor immediately, without saving its unsaved data.
The editor session can not be stopped if it is busy in importing or exporting CAD files. In such situations, this command throws an ApplicationBusyException exception.
The UpdateCAD command updates the geometry component using parameter values from the Geometry Editor. If the parameters are coming from external CAD systems through attach features in the editor, then the attach feature is refreshed to update the parameters. The editor model is re-generated using the updated parameter values.
Geometry data object
The general property that defines the user-visible name of an entity. This property is defined for all data entities but is used only in those entities that present a label in the user interface.
The location of file currently assigned to geometry component. DesignModeler process this file when started through Edit command.
Analysis Type preference. Import 3D objects or 2D objects (objects must be in the x-y plane)
Associativity preference. Indicates if action should be taken to allow associativity. This option is present because some CAD systems take too long to compute associativity.
Import Attributes preference. Allows import of CAD system attributes into the Mechanical application models. Enable this option to import Motion Loads.
Import Attributes filter Key. (Displayed only when Attributes is selected.) This field can have any number of prefixes with each prefix delimited by a semicolon. If the filter is set to an empty string all applicable entities will be imported as Attributes.
Compare Parts On Update preference. Runs a post update comparison of parts from the original model and the new one. Marking those which have no topological or geometric changes as unmodified. This marking saves the time for remeshing.
Compare Parts Tolerance Preference. Sets one of three tolerance values for comparison when running Compare Parts On Update
Import Coordinate Systems preference. Specifies whether coordinate systems created in the CAD application should be imported into the Mechanical application.
Import Coordinate Systems filter Key. (Displayed only when Coordinate Systems is selected.) This field can have any number of prefixes with each prefix delimited by a semicolon. If the filter is set to an empty string all applicable entities will be imported asCoordinate Systems.
Decompose Disjoint Face preference. Use to turn on/off the breaking of disjoint faces into multiple faces.
Import Using Instances preference. Processes a CAD model by honoring its part instances to produce faster attach times and smaller database sizes.
Import Line Bodies preference. (If mixed dimension parts, Mixed Import Resolution preference is used.)
Import Material Properties preference. Allows import of material data defined in the CAD system. Only a subset of material data will be imported. This will include Young's Modulus, Poisson Ratio, Mass Density, Specific Heat, Thermal Conductivity and Thermal Expansion Coefficient. Limited additional data may be imported depending on CAD support.
Mixed Import Resolution preference. Allows parts of mixed dimension to be imported as components of assemblies which have parts of different dimension.
Import Named Selections preference. Creates a named selection based on data generated in the CAD system or in the DesignModeler application.
Import Named Selections filter Key. (Displayed only when Named Selections is selected.) This field can have any number of prefixes with each prefix delimited by a semicolon. If the filter is set to an empty string all applicable entities will be imported as Named Selections.
Import Parameters preference. Allows user to turn on or off parameter processing.
Import Parameter filter Key. (Displayed only when Parameters is selected.) Allows user to specify a key that must appear at the beginning or end of a CAD parameter name to be imported. If the filter is set to an empty string all CAD parameters will be imported.
Enclosure and Symmetry preference. Use to turn on/off the processing of enclosure and symmetry named selections.
Reader Mode Saves Updated File preference. When set to Yes, the interface will save the part file of a model at the end of an update process using the same file name in the same directory.
Smart CAD Update preference. Speeds up refresh of models that have unmodified components. If set to Yes and changes are made to other preferences, these will not be respected if the component is smart updated.
Import Solid Bodies preference. (If mixed dimension parts, Mixed Import Resolution preference is used.)
GeometryImportSpaceClaimExplodeUnsharedComponents
Cut Angle parameter for the Angle Algorithm
Tolerance Angle parameter for the Angle Algorithm
Ignore secondary nodes parameter for the Curvature Algorithm
Planes tolerance parameter for the Curvature Algorithm
Sharp edges angle parameter for the Curvature Algorithm
Analysis Type preference. Import 3D objects or 2D objects (objects must be in the x-y plane)
Import Surface Bodies preference. (If mixed dimension parts, Mixed Import Resolution preference is used.)
Import Work Points preference. Specifies whether work points created in the CAD application should be imported into the Mechanical application.
Current PlugInName - Returns TempPlugin if active DM session is editing. Otherwise return the real plugin name. This is also not persisted.
The source string obtained from the Teamcenter, pointing to the NX geometry.
Modeler data object
The general property that defines the user-visible name of an entity. This property is defined for all data entities but is used only in those entities that present a label in the user interface.
The location of file currently assigned to geometry component. DesignModeler process this file when started through Edit command.
Analysis Type preference. Import 3D objects or 2D objects (objects must be in the x-y plane)
Associativity preference. Indicates if action should be taken to allow associativity. This option is present because some CAD systems take too long to compute associativity.
Import Attributes preference. Allows import of CAD system attributes into the Mechanical application models. Enable this option to import Motion Loads.
Import Attributes filter Key. (Displayed only when Attributes is selected.) This field can have any number of prefixes with each prefix delimited by a semicolon. If the filter is set to an empty string all applicable entities will be imported as Attributes.
Compare Parts On Update preference. Runs a post update comparison of parts from the original model and the new one. Marking those which have no topological or geometric changes as unmodified. This marking saves the time for remeshing.
Compare Parts Tolerance Preference. Sets one of three tolerance values for comparison when running Compare Parts On Update
Import Coordinate Systems preference. Specifies whether coordinate systems created in the CAD application should be imported into the Mechanical application.
Import Coordinate Systems filter Key. (Displayed only when Coordinate Systems is selected.) This field can have any number of prefixes with each prefix delimited by a semicolon. If the filter is set to an empty string all applicable entities will be imported asCoordinate Systems.
Decompose Disjoint Face preference. Use to turn on/off the breaking of disjoint faces into multiple faces.
Import Using Instances preference. Processes a CAD model by honoring its part instances to produce faster attach times and smaller database sizes.
Import Line Bodies preference. (If mixed dimension parts, Mixed Import Resolution preference is used.)
Import Material Properties preference. Allows import of material data defined in the CAD system. Only a subset of material data will be imported. This will include Young's Modulus, Poisson Ratio, Mass Density, Specific Heat, Thermal Conductivity and Thermal Expansion Coefficient. Limited additional data may be imported depending on CAD support.
Mixed Import Resolution preference. Allows parts of mixed dimension to be imported as components of assemblies which have parts of different dimension.
Import Named Selections preference. Creates a named selection based on data generated in the CAD system or in the DesignModeler application.
Import Named Selections filter Key. (Displayed only when Named Selections is selected.) This field can have any number of prefixes with each prefix delimited by a semicolon. If the filter is set to an empty string all applicable entities will be imported as Named Selections.
Import Parameters preference. Allows user to turn on or off parameter processing.
Import Parameter filter Key. (Displayed only when Parameters is selected.) Allows user to specify a key that must appear at the beginning or end of a CAD parameter name to be imported. If the filter is set to an empty string all CAD parameters will be imported.
Enclosure and Symmetry preference. Use to turn on/off the processing of enclosure and symmetry named selections.
Reader Mode Saves Updated File preference. When set to Yes, the interface will save the part file of a model at the end of an update process using the same file name in the same directory.
Smart CAD Update preference. Speeds up refresh of models that have unmodified components. If set to Yes and changes are made to other preferences, these will not be respected if the component is smart updated.
Import Solid Bodies preference. (If mixed dimension parts, Mixed Import Resolution preference is used.)
GeometryImportSpaceClaimExplodeUnsharedComponents
Cut Angle parameter for the Angle Algorithm
Tolerance Angle parameter for the Angle Algorithm
Ignore secondary nodes parameter for the Curvature Algorithm
Planes tolerance parameter for the Curvature Algorithm
Sharp edges angle parameter for the Curvature Algorithm
Analysis Type preference. Import 3D objects or 2D objects (objects must be in the x-y plane)
Import Surface Bodies preference. (If mixed dimension parts, Mixed Import Resolution preference is used.)
Import Work Points preference. Specifies whether work points created in the CAD application should be imported into the Mechanical application.
Current PlugInName - Returns TempPlugin if active DM session is editing. Otherwise return the real plugin name. This is also not persisted.
The source string obtained from the Teamcenter, pointing to the NX geometry.