Part#

class ansys.mechanical.stubs.v241.Ansys.ACT.Automation.Mechanical.Part#

Bases: object

Defines a Part.

Overview#

ClearGeneratedData

Run the ClearGeneratedData action.

CreateParameter

Creates a new parameter for a Property.

RemoveParameter

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

GenerateMesh

Run the GenerateMesh action.

PreviewInflation

Run the PreviewInflation action.

PreviewSurfaceMesh

Run the PreviewSurfaceMesh action.

Update

Run the Update action.

GetChildren

Gets the list of children, filtered by type.

GetChildren

Gets the list of children, filtered by type.

AddComment

Creates a new child Comment.

AddFigure

Creates a new child Figure.

AddImage

Creates a new child Image.

Activate

Activate the current object.

CopyTo

Copies all visible properties from this object to another.

Duplicate

Creates a copy of the current DataModelObject.

GroupAllSimilarChildren

Run the GroupAllSimilarChildren action.

GroupSimilarObjects

Run the GroupSimilarObjects action.

PropertyByName

Get a property by its unique name.

PropertyByAPIName

Get a property by its API name.

GetParameter

Gets the parameter corresponding to the given property.

MaterialName

Gets or sets the MaterialName.

Hidden

Hide or show the body.

ConfigurationId

Gets the related Result Mesh’s ConfigurationId.

ResultMeshId

Gets the related Result Mesh’s ObjectId.

Assignment

Gets or sets the Assignment.

InternalObject

Gets the internal object. For advanced usage only.

Elements

Gets the Elements.

Material

Gets or sets the Material.

Average

Gets the Average.

Maximum

Gets the Maximum.

Minimum

Gets the Minimum.

StandardDeviation

Gets the StandardDeviation.

Nodes

Gets the Nodes.

ApproximateSurfaceArea

Gets the ApproximateSurfaceArea.

LengthX

Gets the LengthX.

LengthY

Gets the LengthY.

LengthZ

Gets the LengthZ.

Mass

Gets the Mass.

CentroidX

Gets the CentroidX.

CentroidY

Gets the CentroidY.

CentroidZ

Gets the CentroidZ.

MomentOfInertiaIp1

Gets the MomentOfInertiaIp1.

MomentOfInertiaIp2

Gets the MomentOfInertiaIp2.

MomentOfInertiaIp3

Gets the MomentOfInertiaIp3.

Volume

Gets the Volume.

MeshMetric

Gets the MeshMetric.

Visible

Gets or sets the Visible.

Suppressed

Gets or sets the Suppressed.

CoordinateSystem

Gets or sets the CoordinateSystem.

DataModelObjectCategory

Gets the current DataModelObject’s category.

Children

Gets the list of children.

Comments

Gets the list of associated comments.

Figures

Gets the list of associated figures.

Images

Gets the list of associated images.

ReadOnly

Gets or sets the ReadOnly.

InternalObject

Gets the internal object. For advanced usage only.

Properties

Gets the list of properties for this object.

VisibleProperties

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

Property detail#

property Part.MaterialName: System.String | None

Gets or sets the MaterialName.

property Part.Hidden: System.Boolean | None

Hide or show the body.

property Part.ConfigurationId: System.Int32 | None

Gets the related Result Mesh’s ConfigurationId.

property Part.ResultMeshId: System.Int32 | None

Gets the related Result Mesh’s ObjectId.

property Part.Assignment: System.String | None

Gets or sets the Assignment.

property Part.InternalObject: Ansys.Common.Interop.DSObjectsAuto.IDSBodyGroupAuto | None

Gets the internal object. For advanced usage only.

property Part.Elements: System.Int32 | None

Gets the Elements.

property Part.Material: System.String | None

Gets or sets the Material.

property Part.Average: System.Double | None

Gets the Average.

property Part.Maximum: System.Double | None

Gets the Maximum.

property Part.Minimum: System.Double | None

Gets the Minimum.

property Part.StandardDeviation: System.Double | None

Gets the StandardDeviation.

property Part.Nodes: System.Int32 | None

Gets the Nodes.

property Part.ApproximateSurfaceArea: System.Double | None

Gets the ApproximateSurfaceArea.

property Part.LengthX: Ansys.Core.Units.Quantity | None

Gets the LengthX.

property Part.LengthY: Ansys.Core.Units.Quantity | None

Gets the LengthY.

property Part.LengthZ: Ansys.Core.Units.Quantity | None

Gets the LengthZ.

property Part.Mass: Ansys.Core.Units.Quantity | None

Gets the Mass.

property Part.CentroidX: Ansys.Core.Units.Quantity | None

Gets the CentroidX.

property Part.CentroidY: Ansys.Core.Units.Quantity | None

Gets the CentroidY.

property Part.CentroidZ: Ansys.Core.Units.Quantity | None

Gets the CentroidZ.

property Part.MomentOfInertiaIp1: Ansys.Core.Units.Quantity | None

Gets the MomentOfInertiaIp1.

property Part.MomentOfInertiaIp2: Ansys.Core.Units.Quantity | None

Gets the MomentOfInertiaIp2.

property Part.MomentOfInertiaIp3: Ansys.Core.Units.Quantity | None

Gets the MomentOfInertiaIp3.

property Part.Volume: Ansys.Core.Units.Quantity | None

Gets the Volume.

property Part.MeshMetric: Ansys.Mechanical.DataModel.Enums.MeshMetricType | None

Gets the MeshMetric.

property Part.Visible: System.Boolean | None

Gets or sets the Visible.

property Part.Suppressed: System.Boolean | None

Gets or sets the Suppressed.

property Part.CoordinateSystem: Ansys.ACT.Automation.Mechanical.CoordinateSystem | None

Gets or sets the CoordinateSystem.

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

Gets the current DataModelObject’s category.

property Part.Children: System.Collections.Generic.IList[Ansys.Mechanical.DataModel.Interfaces.IDataModelObject] | None

Gets the list of children.

property Part.Comments: System.Collections.Generic.IEnumerable[Ansys.ACT.Automation.Mechanical.Comment] | None

Gets the list of associated comments.

property Part.Figures: System.Collections.Generic.IEnumerable[Ansys.ACT.Automation.Mechanical.Figure] | None

Gets the list of associated figures.

property Part.Images: System.Collections.Generic.IEnumerable[Ansys.ACT.Automation.Mechanical.Image] | None

Gets the list of associated images.

property Part.ReadOnly: System.Boolean | None

Gets or sets the ReadOnly.

property Part.InternalObject: System.Object | None

Gets the internal object. For advanced usage only.

property Part.Properties: System.Collections.Generic.IReadOnlyList[Ansys.ACT.Automation.Mechanical.Property] | None

Gets the list of properties for this object.

property Part.VisibleProperties: System.Collections.Generic.IReadOnlyList[Ansys.ACT.Automation.Mechanical.Property] | None

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

Method detail#

Part.ClearGeneratedData() System.Void

Run the ClearGeneratedData action.

Part.CreateParameter(paramPath: System.String) Ansys.ACT.Interfaces.Mechanical.IParameter

Creates a new parameter for a Property.

Part.RemoveParameter(paramPath: System.String) System.Void

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

Part.GenerateMesh() System.Void

Run the GenerateMesh action.

Part.PreviewInflation() System.Void

Run the PreviewInflation action.

Part.PreviewSurfaceMesh() System.Void

Run the PreviewSurfaceMesh action.

Part.Update() System.Void

Run the Update action.

Part.GetChildren(recurses: System.Boolean, children: System.Collections.Generic.IList[ChildrenType]) System.Collections.Generic.IList[ChildrenType]

Gets the list of children, filtered by type.

Part.GetChildren(category: Ansys.Mechanical.DataModel.Enums.DataModelObjectCategory, recurses: System.Boolean, children: System.Collections.Generic.IList[Ansys.Mechanical.DataModel.Interfaces.IDataModelObject]) System.Collections.Generic.IList[Ansys.Mechanical.DataModel.Interfaces.IDataModelObject]

Gets the list of children, filtered by type.

Part.AddComment() Ansys.ACT.Automation.Mechanical.Comment

Creates a new child Comment.

Part.AddFigure() Ansys.ACT.Automation.Mechanical.Figure

Creates a new child Figure.

Part.AddImage(filePath: System.String) Ansys.ACT.Automation.Mechanical.Image
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.
Part.Activate() System.Void

Activate the current object.

Part.CopyTo(other: Ansys.ACT.Automation.Mechanical.DataModelObject) System.Void

Copies all visible properties from this object to another.

Part.Duplicate() Ansys.Mechanical.DataModel.Interfaces.IDataModelObject

Creates a copy of the current DataModelObject.

Part.GroupAllSimilarChildren() System.Void

Run the GroupAllSimilarChildren action.

Part.GroupSimilarObjects() Ansys.ACT.Automation.Mechanical.TreeGroupingFolder

Run the GroupSimilarObjects action.

Part.PropertyByName(name: System.String) Ansys.ACT.Automation.Mechanical.Property

Get a property by its unique name.

Part.PropertyByAPIName(name: System.String) Ansys.ACT.Automation.Mechanical.Property
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.
Part.GetParameter(propName: System.String) Ansys.ACT.Interfaces.Mechanical.IParameter

Gets the parameter corresponding to the given property.