Skip to main content

Mechanical scripting interface

MeshWorkflow

Last update: 14.01.2025

class Ansys.ACT.Automation.Mechanical.MeshWorkflow

Bases: object

Object that wraps IDSEngineeringModelWorkflowGroup.

Overview

Methods

Name Description
Activate Activate the current object.
AddFigure Creates a new child Figure.
AddImage Creates a new child Image.
AddInput Adds an “Input” node as child object under the “Mesh Workflow” and returns the new MeshWorkflowInput object if not existent, otherwise it returns the already available MeshWorkflowInput object.
AddOutput Adds an “Output” node as child object under the “Mesh Workflow” and returns the new MeshWorkflowOutput object if not existent, otherwise it returns the already available MeshWorkflowOutput object.
ClearGeneratedData Clears all the generated data, i.e., It resets all inactive geometry parts/bodies to active again, clears the output data, and resets the state of the child objects (“Input”, “Steps”, “Output”) to the initial state. However, any user-defined settings such as the “Input” node scoping are retained.
ClearOutputData Clears only the “Output” data, i.e., the generated Geometry part(s) and the associated mesh.
CopyTo Copies all visible properties from this object to another.
CreateParameter Creates a new parameter for a Property.
Delete Run the Delete action.
Duplicate Creates a copy of the current DataModelObject.
ExportWorkflow Exports the steps as template into a .emx file.
FinalizeWorkflow Once all steps in a mesh workflow are completed successfully, the workflow can be completed which will transfer the generated data back into new Mechanical geometry part(s) together with the corresponding part mesh(es).
Generate Generates the desired data by executing the whole workflow, i.e., transferring the input data, executing all steps, and completing the workflow by transferring the output data back into Geometry and Mesh data.
GetAllLabelNames Gets all the PrimeMesh model labels names currently defined for the workflow.
GetAllPartNames Gets all the PrimeMesh model parts names currently defined for the workflow.
GetAllSizeFieldNames Gets all the PrimeMesh model volumetric size field names currently defined for the workflow.
GetAllZoneNames Gets all the PrimeMesh model zones names currently defined for the workflow.
GetChildren Gets the list of children, filtered by type.
GetParameter Gets the parameter corresponding to the given property.
GetSolidSurfaceMeshQualityWarningLimit Get Mesh Quality Warning Limit
GroupAllSimilarChildren Run the GroupAllSimilarChildren action.
GroupSimilarObjects Run the GroupSimilarObjects action.
ImportWorkflow Imports the steps from a template .emx file.
InitializeWorkflow Initializes the mesh workflow by transferring the scoped geometry parts/bodies from Mechanical into the PrimeMesh model and updates the “Input” node state accordingly.
PropertyByAPIName Get a property by its API name.
PropertyByName Get a property by its unique name.
RemoveParameter Removes the parameter from the parameter set corresponding to the given property.

Properties

Name Description
Children Gets the list of children.
DataModelObjectCategory Gets the current DataModelObject’s category.
Figures Gets the list of associated figures.
Images Gets the list of associated images.
ImportedWorkflowFilename The filename of the template.emx file that populated the workflow initially.
InternalObject Gets the internal object. For advanced usage only.
Properties Gets the list of properties for this object.
UnitSystem Defines the “unit system” of a Prime Model, if not defined, the unit system is deduced from the geometry at input data transfer time.
VisibleProperties Gets the list of properties that are visible for this object.
WorkflowType Returns the workflow type which is applicable to the Input, Steps, and Output.

Property detail

property MeshWorkflow.Children : List[Ansys.Mechanical.DataModel.Interfaces.IDataModelObject] | None

Gets the list of children.

property MeshWorkflow.DataModelObjectCategory : Ansys.Mechanical.DataModel.Enums.DataModelObjectCategory | None

Gets the current DataModelObject’s category.

property MeshWorkflow.Figures : Iterable[Ansys.ACT.Automation.Mechanical.Figure] | None

Gets the list of associated figures.

property MeshWorkflow.Images : Iterable[Ansys.ACT.Automation.Mechanical.Image] | None

Gets the list of associated images.

property MeshWorkflow.ImportedWorkflowFilename : str | None

The filename of the template.emx file that populated the workflow initially.

property MeshWorkflow.InternalObject : Ansys.Common.Interop.DSObjectsAuto.IDSEngineeringModelWorkflowGroupAuto | None

Gets the internal object. For advanced usage only.

property MeshWorkflow.Properties : tuple[Ansys.ACT.Automation.Mechanical.Property] | None

Gets the list of properties for this object.

property MeshWorkflow.UnitSystem : Ansys.Mechanical.DataModel.Enums.WBUnitSystemType | None

Defines the “unit system” of a Prime Model, if not defined, the unit system is deduced from the geometry at input data transfer time.

property MeshWorkflow.VisibleProperties : tuple[Ansys.ACT.Automation.Mechanical.Property] | None

Gets the list of properties that are visible for this object.

property MeshWorkflow.WorkflowType : Ansys.Mechanical.DataModel.MechanicalEnums.MeshWorkflow.WorkflowType | None

Returns the workflow type which is applicable to the Input, Steps, and Output.

Method detail

MeshWorkflow.Activate()

Activate the current object.

MeshWorkflow.AddFigure()

Creates a new child Figure.

MeshWorkflow.AddImage(filePath: str)

Creates a new child Image.
If a filePath is provided, the image will be loaded from that file,
if not, the image will be a screen capture of the Geometry window.

MeshWorkflow.AddInput()

Adds an “Input” node as child object under the “Mesh Workflow” and returns the new MeshWorkflowInput object if not existent, otherwise it returns the already available MeshWorkflowInput object.

MeshWorkflow.AddOutput()

Adds an “Output” node as child object under the “Mesh Workflow” and returns the new MeshWorkflowOutput object if not existent, otherwise it returns the already available MeshWorkflowOutput object.

MeshWorkflow.ClearGeneratedData()

Clears all the generated data, i.e., It resets all inactive geometry parts/bodies to active again, clears the output data, and resets the state of the child objects (“Input”, “Steps”, “Output”) to the initial state. However, any user-defined settings such as the “Input” node scoping are retained.

MeshWorkflow.ClearOutputData()

Clears only the “Output” data, i.e., the generated Geometry part(s) and the associated mesh.

MeshWorkflow.CopyTo(other: Ansys.ACT.Automation.Mechanical.DataModelObject)

Copies all visible properties from this object to another.

MeshWorkflow.CreateParameter(propName: str)

Creates a new parameter for a Property.

MeshWorkflow.Delete()

Run the Delete action.

MeshWorkflow.Duplicate()

Creates a copy of the current DataModelObject.

MeshWorkflow.ExportWorkflow(fileName: str)

Exports the steps as template into a .emx file.

MeshWorkflow.FinalizeWorkflow()

Once all steps in a mesh workflow are completed successfully, the workflow can be completed which will transfer the generated data back into new Mechanical geometry part(s) together with the corresponding part mesh(es).

MeshWorkflow.Generate()

Generates the desired data by executing the whole workflow, i.e., transferring the input data, executing all steps, and completing the workflow by transferring the output data back into Geometry and Mesh data.

MeshWorkflow.GetAllLabelNames()

Gets all the PrimeMesh model labels names currently defined for the workflow.

MeshWorkflow.GetAllPartNames()

Gets all the PrimeMesh model parts names currently defined for the workflow.

MeshWorkflow.GetAllSizeFieldNames()

Gets all the PrimeMesh model volumetric size field names currently defined for the workflow.

MeshWorkflow.GetAllZoneNames()

Gets all the PrimeMesh model zones names currently defined for the workflow.

MeshWorkflow.GetChildren(recurses: bool, children: List[ChildrenType])

Gets the list of children, filtered by type.

MeshWorkflow.GetParameter(propName: str)

Gets the parameter corresponding to the given property.

MeshWorkflow.GetSolidSurfaceMeshQualityWarningLimit(meshMetric: Ansys.Mechanical.DataModel.Enums.MeshMetricType)

Get Mesh Quality Warning Limit

MeshWorkflow.GroupAllSimilarChildren()

Run the GroupAllSimilarChildren action.

MeshWorkflow.GroupSimilarObjects()

Run the GroupSimilarObjects action.

MeshWorkflow.ImportWorkflow(fileName: str)

Imports the steps from a template .emx file.

MeshWorkflow.InitializeWorkflow()

Initializes the mesh workflow by transferring the scoped geometry parts/bodies from Mechanical into the PrimeMesh model and updates the “Input” node state accordingly.

MeshWorkflow.PropertyByAPIName(name: str)

Get a property by its API name.
If multiple properties have the same API Name, only the first property with that name will be returned.

MeshWorkflow.PropertyByName(name: str)

Get a property by its unique name.

MeshWorkflow.RemoveParameter(propName: str)

Removes the parameter from the parameter set corresponding to the given property.