Skip to main content

Mechanical scripting interface

Chart

Last update: 14.01.2025

class Ansys.ACT.Automation.Mechanical.Chart

Bases: object

Defines a Chart.

Overview

Methods

Name Description
Activate Activate the current object.
AddComment Creates a new child Comment.
AddImage Creates a new child Image.
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.
RemoveParameter Removes the parameter from the parameter set corresponding to the given property.

Properties

Name Description
Caption Gets or sets the Caption.
Children Gets the list of children.
Comments Gets the list of associated comments.
Content Gets or sets the Content.
DataModelObjectCategory Gets the current DataModelObject’s category.
Gridlines Gets or sets the Gridlines.
Images Gets the list of associated images.
InternalObject Gets the internal object. For advanced usage only.
ModalDisplayType Gets or sets the ModalDisplayType.
OutlineSelection Gets or sets the OutlineSelection.
PlotStyle Gets or sets the PlotStyle.
Properties Gets the list of properties for this object.
Scale Gets or sets the Scale.
VisibleProperties Gets the list of properties that are visible for this object.
XAxis Use to control the X Axis property of the chart.
XAxisLabel Gets or sets the XAxisLabel.
YAxisLabel Gets or sets the YAxisLabel.

Property detail

property Chart.Caption : str | None

Gets or sets the Caption.

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

Gets the list of children.

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

Gets the list of associated comments.

property Chart.Content : Ansys.Mechanical.DataModel.Enums.ChartReportType | None

Gets or sets the Content.

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

Gets the current DataModelObject’s category.

property Chart.Gridlines : Ansys.Mechanical.DataModel.Enums.ChartGridlines | None

Gets or sets the Gridlines.

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

Gets the list of associated images.

property Chart.InternalObject : Ansys.Common.Interop.DSObjectsAuto.IDSChartAuto | None

Gets the internal object. For advanced usage only.

property Chart.ModalDisplayType : Ansys.Mechanical.DataModel.Enums.ChartModalType | None

Gets or sets the ModalDisplayType.

property Chart.OutlineSelection : Iterable[Ansys.Mechanical.DataModel.Interfaces.IDataModelObject] | None

Gets or sets the OutlineSelection.

property Chart.PlotStyle : Ansys.Mechanical.DataModel.Enums.ChartPlotStyle | None

Gets or sets the PlotStyle.

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

Gets the list of properties for this object.

property Chart.Scale : Ansys.Mechanical.DataModel.Enums.ChartScale | None

Gets or sets the Scale.

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

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

property Chart.XAxis : Ansys.ACT.Automation.Mechanical.ChartXAxis | None

Use to control the X Axis property of the chart.

property Chart.XAxisLabel : str | None

Gets or sets the XAxisLabel.

property Chart.YAxisLabel : str | None

Gets or sets the YAxisLabel.

Method detail

Chart.Activate()

Activate the current object.

Chart.AddComment()

Creates a new child Comment.

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

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

Copies all visible properties from this object to another.

Chart.CreateParameter(propName: str)

Creates a new parameter for a Property.

Chart.Delete()

Run the Delete action.

Chart.Duplicate()

Creates a copy of the current DataModelObject.

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

Gets the list of children, filtered by type.

Chart.GetParameter(propName: str)

Gets the parameter corresponding to the given property.

Chart.GroupAllSimilarChildren()

Run the GroupAllSimilarChildren action.

Chart.GroupSimilarObjects()

Run the GroupSimilarObjects action.

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

Chart.PropertyByName(name: str)

Get a property by its unique name.

Chart.RemoveParameter(propName: str)

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