Mechanical Results

Mechanical Results
This container holds Results data for an instance of Ansys Mechanical.

Methods

Edit

Opens the Mechanical editor and attaches geometry.

Optional Arguments

ForceGui    Specify if Mechanical is required to open in GUI mode. This is needed for Topology Optimization to solve correctly during DP updates.
    Type     bool
    Default Value    False
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 results component with default optional parameter values.

    result.Edit()

Or by specifying optional parameter values:

    result.Edit(Interactive=True)


EditPost

Opens the Mechanical editor and attaches geometry.

Example

To edit the results component with default optional parameter values.

    result.Edit()

Or by specifying optional parameter values:

    result.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

GetMechanicalSystemType

Query to return the reference to the container's MechanicalSystemType data entity.

Return     A reference to the requested MechanicalSystemType data entity.
    Type     DataReference

GetModalOptionsForCdb

Query to return the component reference for a given container and component base name.

Return     A reference to the requested data entity.
    Type     DataReference

GetPhysicsType

Query to return the reference to the container's MechanicalSystemType data entity.

Return     A reference to the requested MechanicalSystemType data entity.
    Type     DataReference

GetSimulationImportOptionsForResult

Query to return the component reference for a given container and component base name.

Return     A reference to the requested data entity.
    Type     DataReference

GetSimulationResultFile

Query to return the component reference for a given container and component base name.

Return     A reference to the requested data entity.
    Type     DataReference

GetStaticOptionsForCdb

Query to return the component reference for a given container and component base name.

Return     A reference to the requested data entity.
    Type     DataReference

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

ExtensionName    Extension name for the command Only available with Python commmands and defaults to empty
    Type    string
Language    Language of the command. The default value of Language is "Javascript".
    Type    string
    Default Value    Javascript
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

ModalOptionsForCdb

ModalOptionsForCdb

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
Mode

Time

Type     int
Read Only    No
ScaleFactor

Scale Factor

Type     double
Read Only    No

SimulationImportOptionsForResult

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
LengthUnit

Length unit of cdb

Type     string
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
Source

The upstream model source

Type     string
Read Only    No

SimulationResultsStlZip

DataTransfer provider that holds the file reference to a zipped folder of STL and pmdb files.

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
ExportTopOptAction

No details are provided for this entry.

Type     SimulationTopOptAction
Read Only    No
TransferDataObject

The data transfer object provided by this provider

Type     DataReference
Read Only    No
TransferFile

No details are provided for this entry.

Type     DataReference
Read Only    Yes
VersionNumber

No details are provided for this entry.

Type     int
Read Only    Yes

StaticOptionsForCdb

StaticOptionsForCdb

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
ScaleFactor

Scale Factor

Type     double
Read Only    No
Time

Time

Type     double
Read Only    No