Geometry

Geometry
This container holds imported or generated geometry from an instance of DesignModeler.

Methods

Edit

The Edit command starts the geometry editor, which is either DesignModeler or SpaceClaim, if it is not already running. If the geometry editor is already running, this command brings its window into focus.

If a CAD file is assigned to a geometry component, the file is loaded in the geometry editor.

Optional Arguments

Interactive    Whether the geometry editor is to be started in interactive mode or batch mode.
    Type    bool
    Default Value    True
IsDiscoveryGeometry    Whether to edit the geometry in Discovery. If the user wants to use Discovery as the geometry editor, then IsDiscoveryGeometry should be set to true. If the user wants to use DesignModeler as the geometry editor, then IsDiscoveryGeometry should be set to false.
    Type    bool
    Default Value    False
IsSpaceClaimGeometry    Whether to edit the geometry in SpaceClaim. If the user wants to use SpaceClaim as the geometry editor, then IsSpaceClaimGeometry should be set to true. If the user wants to use DesignModeler as the geometry editor, then IsSpaceClaimGeometry should be set to false.
    Type    bool
    Default Value    False
StartupArguments    Additional arguments to send to the modeler. These are to be supplied as command line options when the geometry editor is launched. Applies only to SpaceClaim.
    Type    string
Example

The following example creates a geometry system from the Geometry template, then launches the SpaceClaim editor in interactive mode.

    template1 = GetTemplate(TemplateName="Geometry")
    system1 = template1.CreateSystem()
    geometry1 = system1.GetContainer(ComponentName="Geometry")
    geometry1.Edit(IsSpaceClaimGeometry=True)


Exit

The Exit command shuts down the running session of the geometry editor. Before shutting down, the geometry is brought up to date and the editor saves its database.

The editor session cannot be closed if it is busy in generating features or seeking the user's input. In such situations, this command throws an ApplicationBusyException exception.


Export

The export command exports geometry data in the 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 exceptions:

CommandFailedExceptionApplicationBusyException
Export file format is not supported. Export file location doesn't exists. File name contains invalid characters. When the editor is busy.

Required Arguments

FilePath    Output file path
    Type    string
Example

Suppose the geometry in the container "Geometry" needs to be 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"))


GetGeometryProperties

Return a reference to DataEntity managing property settings of Geometry Container.

Return     Reference to DataEntity managing geometry properties
    Type     DataReference

Refresh

The 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 successful execution of this command, the geometry component goes into the "update required" state.


RunScript

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:

ScriptFilePath of the script file to be run.

Required Arguments

ScriptFile    Path of the script file
    Type    string

Optional Arguments

useAsMacro    For internal use only.
    Type    bool
    Default Value    True

SendCommand

SendCommand sends a javascript or python command string to the geometry editor for execution. If the editor is not open, it will be launched to execute the commands and then closed. If the editor is already running, it will remain running after command execution.

If the editor is busy and not available for executing the instructions, SendCommand throws an ApplicationBusyException exception.

Available options:

Command Language
Javascript or Python command string containing scripting commands for the geometry editor 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

Command    Command string
    Type    string

Optional Arguments

Language    Language of the command. The default value of Language is "Javascript".
    Type    string
    Default Value    Javascript
Example

    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();""")


SetFile

Adds a Geometry file to the Geometry System. The file processed by the geometry editor.

Available options:

FilePath PlugInName
Path of the geometry file PlugIn Name, in case of PlugIn mode geometry transfer

Required Arguments

FilePath    Path of the Geometry File
    Type    string

Optional Arguments

CreatedFileRef    Created File reference
    Type    Output<DataReference>
PlugInName    PlugIn Name, in case of PlugIn mode Geometry transfer
    Type    string
Example

    geometry1 = GetDataContainer("Geometry")
    geometry1.SetFile("C:/Models/block.iges")
    geometry2 = GetDataContainer("Geometry 1")
    geometry2.SetFile(FilePath=AbsUserPathName("Models/block.prt.1"), PlugInName="ProEngineer[1]")


Stop

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.


UpdateCAD

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.


UpdateICManagerParam

Update IC Manager Param updates any of the exposed ICManager parameters

Required Arguments

QuantityName    Name of the Quantity To Update
    Type     string
QuantityValue    Double value of the Quantity to update
    Type     double

WriteNDFFile

Writes a Blade Neutral Data Format File for each flowpath present in the DM model. In the case of a single FlowPath a single NDF file is written. For multiple flowpaths the specified filename is appended with the _[flowpath name] as multiple files are exported.

Required Parameters:

FilePathPath of the NDF file to be exported.

Required Arguments

FilePath    Path of the NDF file
    Type    string

Data Entities

Geometry

Geometry data object

Properties

DisplayText

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.

Type     string
Read Only    No
GeometryFilePath

The location of file currently assigned to geometry component. DesignModeler process this file when started through Edit command.

Type     string
Read Only    No
GeometryImportAnalysisType

Analysis Type preference. Import 3D objects or 2D objects (objects must be in the x-y plane)

Type     AnalysisType
Read Only    No
GeometryImportCadAssociativity

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.

Type     bool
Read Only    No
GeometryImportCadAttributes

Import Attributes preference. Allows import of CAD system attributes into the Mechanical application models. Enable this option to import Motion Loads.

Type     bool
Read Only    No
GeometryImportCadAttributesFilter

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.

Type     string
Read Only    No
GeometryImportCleanGeometryOnImport

Clean

Type     bool
Read Only    No
GeometryImportComparePartsOnUpdate

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.

Type     ComparePartsOnUpdateMethod
Read Only    No
GeometryImportComparePartsTolerance

Compare Parts Tolerance Preference. Sets one of three tolerance values for comparison when running Compare Parts On Update

Type     ComparePartsTolerance
Read Only    No
GeometryImportCoordinateSystems

Import Coordinate Systems preference. Specifies whether coordinate systems created in the CAD application should be imported into the Mechanical application.

Type     bool
Read Only    No
GeometryImportCoordinateSystemsFilter

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.

Type     string
Read Only    No
GeometryImportDecomposeDisjointFaces

Decompose Disjoint Face preference. Use to turn on/off the breaking of disjoint faces into multiple faces.

Type     bool
Read Only    No
GeometryImportFacetQuality

Import Facet Quality option

Type     ImportFacetQuality
Read Only    No
GeometryImportFlattenAssembly

Import Flattened Assembly Preference // hidden

Type     bool
Read Only    No
GeometryImportImportUsingInstances

Import Using Instances preference. Processes a CAD model by honoring its part instances to produce faster attach times and smaller database sizes.

Type     bool
Read Only    No
GeometryImportLineBodies

Import Line Bodies preference. (If mixed dimension parts, Mixed Import Resolution preference is used.)

Type     bool
Read Only    No
GeometryImportMaterialProperties

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.

Type     bool
Read Only    No
GeometryImportMixedResolutionOption

Mixed Import Resolution preference. Allows parts of mixed dimension to be imported as components of assemblies which have parts of different dimension.

Type     MixedImportPref
Read Only    No
GeometryImportNamedSelections

Import Named Selections preference. Creates a named selection based on data generated in the CAD system or in the DesignModeler application.

Type     bool
Read Only    No
GeometryImportNamedSelectionsFilter

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.

Type     string
Read Only    No
GeometryImportParameters

Import Parameters preference. Allows user to turn on or off parameter processing.

Type     CADImportParameterType
Read Only    No
GeometryImportParametersFilter

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.

Type     string
Read Only    No
GeometryImportProcessEnclosures

Enclosure and Symmetry preference. Use to turn on/off the processing of enclosure and symmetry named selections.

Type     bool
Read Only    No
GeometryImportSavePartFile

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.

Type     bool
Read Only    No
GeometryImportSmartUpdate

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.

Type     bool
Read Only    No
GeometryImportSolidBodies

Import Solid Bodies preference. (If mixed dimension parts, Mixed Import Resolution preference is used.)

Type     bool
Read Only    No
GeometryImportSpaceClaimExplodeUnsharedComponents

GeometryImportSpaceClaimExplodeUnsharedComponents

Type     bool
Read Only    No
GeometryImportStitchSurfacesOnImport

Attempt to stitch surfaces together

Type     ImportStitchPreference
Read Only    No
GeometryImportStitchTolerance

Defines the tolerance value to be used when attempting to stitch the surfaces together the value is in meter units

Type     double
Read Only    No
GeometryImportSurfaceBodies

Import Surface Bodies preference. (If mixed dimension parts, Mixed Import Resolution preference is used.)

Type     bool
Read Only    No
GeometryImportWeightclass

Import Weightclass option

Type     ImportWeightclass
Read Only    No
GeometryImportWorkPoints

Import Work Points preference. Specifies whether work points created in the CAD application should be imported into the Mechanical application.

Type     bool
Read Only    No
PlugInName

Current PlugInName - Returns TempPlugin if active DM session is editing. Otherwise return the real plugin name. This is also not persisted.

Type     string
Read Only    No
TeamcenterConnection

The source string obtained from the Teamcenter, pointing to the NX geometry.

Type     string
Read Only    No