Part#

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

Bases: object

Defines a Part.

Overview#

Activate

Activate the current object.

AddComment

Creates a new child Comment.

AddFigure

Creates a new child Figure.

AddImage

Creates a new child Image.

ClearGeneratedData

Run the ClearGeneratedData action.

CopyTo

Copies all visible properties from this object to another.

CreateParameter

Creates a new parameter for a Property.

Duplicate

Creates a copy of the current DataModelObject.

GenerateMesh

Run the GenerateMesh action.

GetChildren

Gets the list of children, filtered by type.

GetParameter

Gets the parameter corresponding to the given property.

GroupAllSimilarChildren

Run the GroupAllSimilarChildren action.

GroupSimilarObjects

Run the GroupSimilarObjects action.

PreviewInflation

Run the PreviewInflation action.

PreviewSurfaceMesh

Run the PreviewSurfaceMesh action.

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.

Update

Run the Update action.

ApproximateSurfaceArea

Gets the ApproximateSurfaceArea.

Assignment

Gets or sets the Assignment.

Average

Gets the Average.

CentroidX

Gets the CentroidX.

CentroidY

Gets the CentroidY.

CentroidZ

Gets the CentroidZ.

Children

Gets the list of children.

Comments

Gets the list of associated comments.

ConfigurationId

Gets the related Result Mesh's ConfigurationId.

CoordinateSystem

Gets or sets the CoordinateSystem.

DataModelObjectCategory

Gets the current DataModelObject's category.

Elements

Gets the Elements.

Figures

Gets the list of associated figures.

Hidden

Hide or show the body.

Images

Gets the list of associated images.

InternalObject

Gets the internal object. For advanced usage only.

LengthX

Gets the LengthX.

LengthY

Gets the LengthY.

LengthZ

Gets the LengthZ.

Mass

Gets the Mass.

Material

Gets or sets the Material.

MaterialName

Gets or sets the MaterialName.

Maximum

Gets the Maximum.

MeshMetric

Gets the MeshMetric.

Minimum

Gets the Minimum.

MomentOfInertiaIp1

Gets the MomentOfInertiaIp1.

MomentOfInertiaIp2

Gets the MomentOfInertiaIp2.

MomentOfInertiaIp3

Gets the MomentOfInertiaIp3.

Nodes

Gets the Nodes.

Properties

Gets the list of properties for this object.

ReadOnly

Gets or sets the ReadOnly.

ResultMeshId

Gets the related Result Mesh's ObjectId.

StandardDeviation

Gets the StandardDeviation.

Suppressed

Gets or sets the Suppressed.

Visible

Gets or sets the Visible.

VisibleProperties

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

Volume

Gets the Volume.

Property detail#

property Part.ApproximateSurfaceArea: float | None#

Gets the ApproximateSurfaceArea.

property Part.Assignment: str | None#

Gets or sets the Assignment.

property Part.Average: float | None#

Gets the Average.

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.Children: List[Ansys.Mechanical.DataModel.Interfaces.IDataModelObject] | None#

Gets the list of children.

property Part.Comments: Iterable[Ansys.ACT.Automation.Mechanical.Comment] | None#

Gets the list of associated comments.

property Part.ConfigurationId: int | None#

Gets the related Result Mesh's ConfigurationId.

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.Elements: int | None#

Gets the Elements.

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

Gets the list of associated figures.

property Part.Hidden: bool | None#

Hide or show the body.

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

Gets the list of associated images.

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

Gets the internal object. For advanced usage only.

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.Material: str | None#

Gets or sets the Material.

property Part.MaterialName: str | None#

Gets or sets the MaterialName.

property Part.Maximum: float | None#

Gets the Maximum.

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

Gets the MeshMetric.

property Part.Minimum: float | None#

Gets the Minimum.

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.Nodes: int | None#

Gets the Nodes.

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

Gets the list of properties for this object.

property Part.ReadOnly: bool | None#

Gets or sets the ReadOnly.

property Part.ResultMeshId: int | None#

Gets the related Result Mesh's ObjectId.

property Part.StandardDeviation: float | None#

Gets the StandardDeviation.

property Part.Suppressed: bool | None#

Gets or sets the Suppressed.

property Part.Visible: bool | None#

Gets or sets the Visible.

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

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

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

Gets the Volume.

Method detail#

Part.Activate() None#

Activate the current object.

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: str) 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.ClearGeneratedData() None#

Run the ClearGeneratedData action.

Part.CopyTo(other: Ansys.ACT.Automation.Mechanical.DataModelObject) None#

Copies all visible properties from this object to another.

Part.CreateParameter(paramPath: str) Ansys.ACT.Interfaces.Mechanical.IParameter#

Creates a new parameter for a Property.

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

Creates a copy of the current DataModelObject.

Part.GenerateMesh() None#

Run the GenerateMesh action.

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

Gets the list of children, filtered by type.

Part.GetParameter(propName: str) Ansys.ACT.Interfaces.Mechanical.IParameter#

Gets the parameter corresponding to the given property.

Part.GroupAllSimilarChildren() None#

Run the GroupAllSimilarChildren action.

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

Run the GroupSimilarObjects action.

Part.PreviewInflation() None#

Run the PreviewInflation action.

Part.PreviewSurfaceMesh() None#

Run the PreviewSurfaceMesh action.

Part.PropertyByAPIName(name: str) 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.PropertyByName(name: str) Ansys.ACT.Automation.Mechanical.Property#

Get a property by its unique name.

Part.RemoveParameter(paramPath: str) None#

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

Part.Update() None#

Run the Update action.