Mechanical Model
Mechanical Model
This container holds Model data for an instance of Ansys Mechanical.
Methods
Edit
Opens the Mechanical editor and attaches geometry.
Optional Arguments
- Hidden Specify if Mechanical will open in hidden mode. The default value is false.
 - Type bool
 - Default Value False
 - Interactive Specify if Mechanical will open in interactive mode. The default value is true.
 - Type bool
 - Default Value True
 - StartAsReadOnly Specify if Mechanical will open in read-only mode. The default value is false.
 - Type bool
 - Default Value False
 
- Example
 To edit the model component with default optional parameter values:
model.Edit()Or by specifying optional parameter values:
model.Edit(Interactive=True)
Exit
Exit the Mechanical editor
Optional Arguments
- SaveDatabase Indicates whether the Mechanical database will be saved prior to exiting
 - Type bool
 - Default Value True
 
Export
Exports a .dsdb file for the model component.
Required Arguments
- FilePath The path and name of the .dsdb file to be written.
 - Type string
 
ExportASMJournal
Exports an ASM Journal (.wbjn) and supporting files for the model component.
Required Arguments
- FilePath The path and name of the .wbjn file to be written. Supporting files written alongside.
 - Type string
 
ExportGeometry
Exports a PartManager database (.pmdb) file for the geometry in the model component.
Required Arguments
- FilePath The path and name of the .pmdb file to be written.
 - Type string
 
ExportMesh
Exports a .acmo file for the mesh in the model component.
Required Arguments
- FilePath The path and name of the .acmo file to be written.
 - Type string
 
GetACPImportOptions
Query to return the data reference to the acp import options
- 
                
ReturnThe Data Entity containing settings for this component. - Type DataReference
 
Required Arguments
- Name The entity of interest.
 - Type string
 
GetMechanicalMesh
Query to return the reference to the container's MechanicalMesh data entity.
- 
                
ReturnA reference to the requested MechanicalMesh data entity. - Type DataReference
 
GetMechanicalMeshFile
Query to return the reference to the container's MechanicalMeshFile data entity.
- 
                
ReturnA reference to the requested MechanicalMeshFile data entity. - Type DataReference
 
GetMechanicalModel
Query to return the reference to the container's MechanicalModel data entity.
- 
                
ReturnA reference to the requested MechanicalModel data entity. - Type DataReference
 
GetMechanicalSystemType
Query to return the reference to the container's MechanicalSystemType data entity.
- 
                
ReturnA reference to the requested MechanicalSystemType data entity. - Type DataReference
 
GetMeshProperties
Query to return the reference to the container's MeshProperties data entity
- 
                
ReturnThe Data Entity containing settings for this component. - Type DataReference
 
GetModelComponentProperties
Query to return the reference to the container's ModelComponentProperties data entity
- 
                
ReturnThe Data Entity containing settings for this component. - Type DataReference
 
GetSimulationImportOptions
Query to return the data reference to the simulation import options
- 
                
ReturnThe Data Entity containing settings for this component. - Type DataReference
 
Required Arguments
- Name The entity of interest.
 - Type string
 
SendCommand
Executes a JScript or python command in the Mechanical editor.
If the Mechanical editor is not open, then the editor's GUI will not be available, causing some commands to fail. In this case, consider calling the container's Edit method to open the editor before using SendCommand.
Furthermore, if the Mechanical editor is not open, SendCommand will start the editor without the GUI, issue the specified command, and then close the editor. For multiple SendCommands, this may degrade performance.
Required Arguments
- Command Command argument containing the command.
 - Type string
 
Optional Arguments
- Example
 To execute some arbitrary command (in this case, causing a dialog box to appear) in the Mechanical editor:
model.SendCommand(Command="WBScript.Out(\"My Text\",true);" )To run a JScript file already saved to disk using Run Macro from Mechanical:
setup.SendCommand(Command="WB.AppletList.Applet(\"DSApplet\").App.Script.doToolsRunMacro(\"C:\\\\macro.js\")")
Data Entities
ACPImportOptions
Import options for model assembly available on the downstream model
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
 
MirrorTransform
Mirror Transformations for the Source Geometry
- Type MirrorTransformOptionsForSimulation
 - Read Only No
 
NumberOfCopies
By default this value is 0, specifies how many additional copies of the upstream model are needed
- Type int
 - Read Only No
 
RenumberMeshElementsAutomatically
By default this value is true, specifies whether the user would like us to automatically renumber his mesh elements to prevent unique id conflicts during assembly
- Type bool
 - Read Only No
 
RigidTransform
Rigid Transformations for the Source Geometry
- Type RigidTransformOptionsForSimulation
 - Read Only No
 
SmoothingCdb
Which upstream CDB file generated by mechanical to use as our model source
- Type string
 - Read Only No
 
TransformationType
Which type of transform we should display to the user
- Type TransformType
 - Read Only No
 
GeneralModelAssemblyProperties
Class used to expose general properties for the model assembly workflow
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
 
ObjectRenaming
Name objects in Mechanical based on selected option
- Type ObjectRenamingTypeInMechanical
 - Read Only No
 
MechanicalMesh
This is the mesh data entity object that will exist in the model container.
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
 
MechanicalModel
The model data entity in the model container.
Properties
AcpRenumberingInformation
ACP automatic renumbering of transfer information
- Type Dictionary<string, List<DataReference>>
 - Read Only No
 
AllowMeshing
Property used to prevent a re meshing in model assembly workflows
- Type bool
 - Read Only No
 
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
 
IsResetNotRequired
Property used to prevent cascasding resets on downstream containers
- Type bool
 - Read Only No
 
ModelConversionAssociativityMap
ACP automatic renumbering of transfer information
- Type Dictionary<string, string>
 - Read Only No
 
ModelId
Model identifier that corresponds with the ID on Model tree node in Mechanical
- Type int
 - Read Only No
 
PrototypeId
Prototype identifier which corresponds to the ID on the Geometry tree node in Mechanical
- Type int
 - Read Only No
 
MechanicalSystemType
This entity provides string based information about the physics, analysis, and solver settings for the Mechanical system component.
Properties
AnalysisTypeDisplayString
The string which represents current analysis type setting.
- Type string
 - Read Only Yes
 
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
 
PhysicsTypeDisplayString
The string which represents current physics type setting.
- Type string
 - Read Only Yes
 
SolverTypeDisplayString
The string which represents current solver type setting.
- Type string
 - Read Only Yes
 
MeshConversionOptionsEntity
(Beta) Entity to control the Skin Detection algorithm for importing cdb files.
Properties
ComponentKey
If the nodal components will be processed during CDB components the nodal component key will allow filtering of which components to process
- Type string
 - Read Only No
 
CreateGeometryEdgeComponents
Should the geometry edge named selections be created during CDB conversion
- Type bool
 - Read Only No
 
CreateGeometryFaceComponents
Should the geometry face named selections be created during CDB conversion
- Type bool
 - Read Only No
 
CreateGeometryVertexComponents
Should the geometry vertex named selections be created during CDB conversion
- Type bool
 - Read Only No
 
CutAngle
Only displayed if Forbid Close Components equals Yes. It is the angle used to cut closed surfaces to separate the elements into components.
- Type Quantity
 - Read Only No
 
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
 
ForbidCloseComponents
Option to split closed surfaces into several components.If Yes then the algorithm cuts closed surfaces into several components. It provides a simple method to avoid problematic faces on closed surfaces.
- Type bool
 - Read Only No
 
GeometryImportAnalysisType
The geometry attach type for the CDB file
- Type GeometryAttachType
 - Read Only No
 
ToleranceAngle
The tolerance angle to seperate two elements into seperate components. If the angle between the normals of two adjacent elements is less than or equal to the Tolerance Angle then the two elements are in the same component, otherwise, they are separated.
- Type Quantity
 - Read Only No
 
VertexInsertionAngle
The Vertex Insertion Angle is the minimunm angle to insert a vertex between two free edges of mesh. During the generation of the geometry, if two segments of an edge abruptly make an angle greater than the Vertex Insertion Angle, then the edge is split and a vertex is inserted.
- Type Quantity
 - Read Only No
 
ModelComponentProperties
No details are provided for this entry.
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
 
ModelOutputSettingsForACP
Entity to control the properties of mesh file generated by Mechanical Model.
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
 
SimulationImportOptions
Import options for model assembly available on the downstream model
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
 
MirrorTransform
Mirror Transformations for the Source Geometry
- Type MirrorTransformOptionsForSimulation
 - Read Only No
 
NumberOfCopies
By default this value is 0, specifies how many additional copies of the upstream model are needed
- Type int
 - Read Only No
 
RenumberMeshElementsAutomatically
By default this value is true, specifies whether the user would like us to automatically renumber his mesh elements to prevent unique id conflicts during assembly
- Type bool
 - Read Only No
 
RigidTransform
Rigid Transformations for the Source Geometry
- Type RigidTransformOptionsForSimulation
 - Read Only No
 
SmoothingCdb
Which upstream CDB file generated by mechanical to use as our model source
- Type string
 - Read Only No
 
TransformationType
Which type of transform we should display to the user
- Type TransformType
 - Read Only No
 
SimulationMeshProperties
Entity to control mesh properties for a Mechanical Model
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