Skip to main content

Mechanical scripting interface

ConstructionLine

Last update: 14.01.2025

class Ansys.ACT.Automation.Mechanical.ConstructionLines.ConstructionLine

Bases: object

Overview

Methods

Name Description
Activate Activate the current object.
AddComment Creates a new child Comment.
AddFigure Creates a new child Figure.
AddImage Creates a new child Image.
AddToGeometry Add a part to Geometry with line bodies as contained in this ConstructionLine instance.
CopyTo Copies all visible properties from this object to another.
CreateParameter Creates a new parameter for a Property.
CreatePlanarPoints CreatePlanarPoints method.
CreatePlane Create a plane.
CreatePoints CreatePoints method.
CreateStraightLines CreateStraightLines method.
DeleteEdges DeleteEdges method.
DeletePlane Delete a plane associated with this construction line.
Duplicate Creates a copy of the current DataModelObject.
FlipEdges FlipEdges method.
GetParameter Gets the parameter corresponding to the given property.
GetPartFromGeometry Get the corresponding part for a ConstructionLine instance.
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.
Redo Redo and undone operation in this Construction Line instance.
RemoveFromGeometry Remove the corresponding part from the geometry.
RemoveParameter Removes the parameter from the parameter set corresponding to the given property.
Undo Undo the last operation in this Construction Line instance.
UpdateGeometry Update the corresponding part with any changes made in this ConstructionLine instance.

Properties

Name Description
Comments Gets the list of associated comments.
DataModelObjectCategory Gets the current DataModelObject’s category.
Edges Creates for the user an IEdge representation of each edge in this Construction Line.
Figures Gets the list of associated figures.
Images Gets the list of associated images.
InternalObject Gets the internal object. For advanced usage only.
Planes Creates for the user an Plane representation of each plane in this Construction Line.
Points Returns all points in this Construction Line, both those that have been created
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.

Property detail

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

Gets the list of associated comments.

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

Gets the current DataModelObject’s category.

property ConstructionLine.Edges : List[Any] | None

Creates for the user an IEdge representation of each edge in this Construction Line.

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

Gets the list of associated figures.

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

Gets the list of associated images.

property ConstructionLine.InternalObject : Ansys.Common.Interop.DSLines.IDSLinesPythonInteraction | None

Gets the internal object. For advanced usage only.

property ConstructionLine.Planes : List[Any] | None

Creates for the user an Plane representation of each plane in this Construction Line.

property ConstructionLine.Points : List[Any] | None

Returns all points in this Construction Line, both those that have been created as well as virtual representations.

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

Gets the list of properties for this object.

property ConstructionLine.ReadOnly : bool | None

Gets or sets the ReadOnly.

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

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

Method detail

ConstructionLine.Activate()

Activate the current object.

ConstructionLine.AddComment()

Creates a new child Comment.

ConstructionLine.AddFigure()

Creates a new child Figure.

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

ConstructionLine.AddToGeometry()

Add a part to Geometry with line bodies as contained in this ConstructionLine instance.

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

Copies all visible properties from this object to another.

ConstructionLine.CreateParameter(propName: str)

Creates a new parameter for a Property.

ConstructionLine.CreatePlanarPoints(plane: Ansys.Mechanical.DataModel.ConstructionLines.Plane, pointDefinitionCollection: Iterable[Any])

CreatePlanarPoints method.

ConstructionLine.CreatePlane(sketchPlaneDefinition: Any)

Create a plane.

ConstructionLine.CreatePoints(pointDefinitionCollection: Iterable[Any])

CreatePoints method.

ConstructionLine.CreateStraightLines(pointCollection: Iterable[Ansys.Mechanical.DataModel.ConstructionLines.Point])

CreateStraightLines method.

ConstructionLine.DeleteEdges(edgeCollection: Iterable[Ansys.Mechanical.DataModel.ConstructionLines.Edges.IEdge])

DeleteEdges method.

ConstructionLine.DeletePlane(plane: Ansys.Mechanical.DataModel.ConstructionLines.Plane, forceDelete: bool)

Delete a plane associated with this construction line.

ConstructionLine.Duplicate()

Creates a copy of the current DataModelObject.

ConstructionLine.FlipEdges(edgesToFlip: Iterable[Ansys.Mechanical.DataModel.ConstructionLines.Edges.IEdge])

FlipEdges method.

ConstructionLine.GetParameter(propName: str)

Gets the parameter corresponding to the given property.

ConstructionLine.GetPartFromGeometry()

Get the corresponding part for a ConstructionLine instance.

ConstructionLine.GroupAllSimilarChildren()

Run the GroupAllSimilarChildren action.

ConstructionLine.GroupSimilarObjects()

Run the GroupSimilarObjects action.

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

ConstructionLine.PropertyByName(name: str)

Get a property by its unique name.

ConstructionLine.Redo()

Redo and undone operation in this Construction Line instance.

ConstructionLine.RemoveFromGeometry()

Remove the corresponding part from the geometry.

ConstructionLine.RemoveParameter(propName: str)

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

ConstructionLine.Undo()

Undo the last operation in this Construction Line instance.

ConstructionLine.UpdateGeometry()

Update the corresponding part with any changes made in this ConstructionLine instance.