Skip to main content

Mechanical scripting interface

Solid

Last update: 14.01.2025

class Ansys.ACT.Automation.Mechanical.Solid

Bases: object

Defines a Solid.

Overview

Methods

Name Description
Activate Activate the current object.
AddComment Creates a new child Comment.
AddGeometry Add solid to the geometry.
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.
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.
PropertyByAPIName Get a property by its API name.
PropertyByName Get a property by its unique name.
RemoveGeometry Remove the solid from the geometry.
RemoveParameter Removes the parameter from the parameter set corresponding to the given property.
UpdateGeometry Update the solid on the geometry.

Properties

Name Description
Children Gets the list of children.
Comments Gets the list of associated comments.
CoordinateSystem Gets or sets the CoordinateSystem.
DataModelObjectCategory Gets the current DataModelObject’s category.
InternalObject Gets the internal object. For advanced usage only.
PartName Gets the PartName.
Properties Gets the list of properties for this object.
ReadOnly Gets or sets the ReadOnly.
VisibleProperties Gets the list of properties that are visible for this object.
X1 Gets or sets the X1.
X2 Gets or sets the X2.
Y1 Gets or sets the Y1.
Y2 Gets or sets the Y2.
Z1 Gets or sets the Z1.
Z2 Gets or sets the Z2.

Property detail

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

Gets the list of children.

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

Gets the list of associated comments.

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

Gets or sets the CoordinateSystem.

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

Gets the current DataModelObject’s category.

property Solid.InternalObject : Ansys.Common.Interop.DSObjectsAuto.IDSSolidAuto | None

Gets the internal object. For advanced usage only.

property Solid.PartName : str | None

Gets the PartName.

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

Gets the list of properties for this object.

property Solid.ReadOnly : bool | None

Gets or sets the ReadOnly.

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

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

property Solid.X1 : Ansys.Core.Units.Quantity | None

Gets or sets the X1.

property Solid.X2 : Ansys.Core.Units.Quantity | None

Gets or sets the X2.

property Solid.Y1 : Ansys.Core.Units.Quantity | None

Gets or sets the Y1.

property Solid.Y2 : Ansys.Core.Units.Quantity | None

Gets or sets the Y2.

property Solid.Z1 : Ansys.Core.Units.Quantity | None

Gets or sets the Z1.

property Solid.Z2 : Ansys.Core.Units.Quantity | None

Gets or sets the Z2.

Method detail

Solid.Activate()

Activate the current object.

Solid.AddComment()

Creates a new child Comment.

Solid.AddGeometry()

Add solid to the geometry.

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

Copies all visible properties from this object to another.

Solid.CreateParameter(propName: str)

Creates a new parameter for a Property.

Solid.Delete()

Run the Delete action.

Solid.Duplicate()

Creates a copy of the current DataModelObject.

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

Gets the list of children, filtered by type.

Solid.GetParameter(propName: str)

Gets the parameter corresponding to the given property.

Solid.GroupAllSimilarChildren()

Run the GroupAllSimilarChildren action.

Solid.GroupSimilarObjects()

Run the GroupSimilarObjects action.

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

Solid.PropertyByName(name: str)

Get a property by its unique name.

Solid.RemoveGeometry()

Remove the solid from the geometry.

Solid.RemoveParameter(propName: str)

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

Solid.UpdateGeometry()

Update the solid on the geometry.