Part#

class ansys.mechanical.stubs.v242.Ansys.ACT.Automation.Mechanical.Part(internalObject: Any)#

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.

CreateObjRef

CreateObjRef method.

CreateParameter

Creates a new parameter for a Property.

Duplicate

Creates a copy of the current DataModelObject.

Equals

Equals method.

GenerateMesh

Run the GenerateMesh action.

GetAPIName

Property name bound to dispId.

GetAllProperties

GetAllProperties method.

GetChildren

Gets the list of children, filtered by type.

GetEnumName

Enum name bound to value

GetGeoPart

GetGeoPart method.

GetHashCode

GetHashCode method.

GetIconFile

GetIconFile method.

GetLifetimeService

GetLifetimeService method.

GetObjectData

GetObjectData method.

GetParameter

Gets the parameter corresponding to the given property.

GetPath

GetPath method.

GetPropertyName

GetPropertyName method.

GetPropertyValue

GetPropertyValue method.

GetType

GetType method.

GetVisibleProperties

GetVisibleProperties method.

GetVisiblePropertyNames

GetVisiblePropertyNames method.

GroupAllSimilarChildren

Run the GroupAllSimilarChildren action.

GroupSimilarObjects

Run the GroupSimilarObjects action.

InitializeLifetimeService

InitializeLifetimeService method.

IsPropertyEditable

IsPropertyEditable method.

IsPropertyVisible

IsPropertyVisible method.

PreviewInflation

Run the PreviewInflation action.

PreviewSurfaceMesh

Run the PreviewSurfaceMesh action.

PropertyByAPIName

Get a property by its API name.

PropertyById

PropertyById method.

PropertyByName

Get a property by its unique name.

RemoveParameter

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

ToString

ToString method.

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.

GroupingFolder

GroupingFolder property.

Hidden

Hide or show the body.

IconName

IconName property.

Images

Gets the list of associated images.

ImportableObjectSourceId

ImportableObjectSourceId property.

InternalObject

Gets the internal object. For advanced usage only.

IsVirtual

IsVirtual property.

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.

Name

Name property.

Nodes

Gets the Nodes.

ObjectId

ObjectId property.

ObjectState

ObjectState property.

ObjectTags

ObjectTags property.

Parent

Parent property.

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.

State

State property.

Suppressed

Gets or sets the Suppressed.

TransferableObjectId

TransferableObjectId property.

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.GroupingFolder: Ansys.Mechanical.DataModel.Interfaces.IDataModelObject | None#

GroupingFolder property.

property Part.Hidden: bool | None#

Hide or show the body.

property Part.IconName: str | None#

IconName property.

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

Gets the list of associated images.

property Part.ImportableObjectSourceId: str | None#

ImportableObjectSourceId property.

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

Gets the internal object. For advanced usage only.

property Part.IsVirtual: bool | None#

IsVirtual property.

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

Name property.

property Part.Nodes: int | None#

Gets the Nodes.

property Part.ObjectId: int | None#

ObjectId property.

property Part.ObjectState: Ansys.Mechanical.DataModel.Enums.ObjectState | None#

ObjectState property.

property Part.ObjectTags: Iterable[Ansys.Mechanical.DataModel.Interfaces.IObjectTag] | None#

ObjectTags property.

property Part.Parent: Ansys.Mechanical.DataModel.Interfaces.IDataModelObject | None#

Parent property.

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.State: Ansys.Mechanical.DataModel.Enums.Legacy.State | None#

State property.

property Part.Suppressed: bool | None#

Gets or sets the Suppressed.

property Part.TransferableObjectId: str | None#

TransferableObjectId property.

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.CreateObjRef(requestedType: type) System.Runtime.Remoting.ObjRef#

CreateObjRef method.

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.Equals(other: Ansys.Mechanical.DataModel.Interfaces.IDataModelObject) bool#

Equals method.

Part.GenerateMesh() None#

Run the GenerateMesh action.

Part.GetAPIName(dispId: int) str#

Property name bound to dispId.

Part.GetAllProperties() List[Ansys.ACT.Automation.Mechanical.AutomationPropertyWrapper]#

GetAllProperties method.

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

Gets the list of children, filtered by type.

Part.GetEnumName(enumType: type, value: int, dispId: int) str#

Enum name bound to value

Part.GetGeoPart() Ansys.ACT.Interfaces.Geometry.IGeoPart#

GetGeoPart method.

Part.GetHashCode() int#

GetHashCode method.

Part.GetIconFile() System.Byte#

GetIconFile method.

Part.GetLifetimeService() Any#

GetLifetimeService method.

Part.GetObjectData(info: System.Runtime.Serialization.SerializationInfo, context: System.Runtime.Serialization.StreamingContext) None#

GetObjectData method.

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

Gets the parameter corresponding to the given property.

Part.GetPath() str#

GetPath method.

Part.GetPropertyName(dispId: int) str#

GetPropertyName method.

Part.GetPropertyValue(name: str) Any#

GetPropertyValue method.

Part.GetType() type#

GetType method.

Part.GetVisibleProperties() List[System.Reflection.PropertyInfo]#

GetVisibleProperties method.

Part.GetVisiblePropertyNames() List[str]#

GetVisiblePropertyNames method.

Part.GroupAllSimilarChildren() None#

Run the GroupAllSimilarChildren action.

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

Run the GroupSimilarObjects action.

Part.InitializeLifetimeService() Any#

InitializeLifetimeService method.

Part.IsPropertyEditable(dispId: int) bool#

IsPropertyEditable method.

Part.IsPropertyVisible(dispId: int) bool#

IsPropertyVisible method.

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.PropertyById(dispId: int) Ansys.ACT.Automation.Mechanical.Property#

PropertyById method.

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.ToString() str#

ToString method.

Part.Update() None#

Run the Update action.