PythonResult#

class ansys.mechanical.stubs.v241.Ansys.ACT.Automation.Mechanical.Results.ScriptableResults.PythonResult#

Bases: object

Defines a PythonResult.

Overview#

Evaluate

Evaluate method.

EvaluateAllResults

Evaluate all results.

ClearGeneratedData

ClearGeneratedData method.

ExportAnimation

Run the ExportAnimation action.

GetChildren

Gets the list of children, filtered by type.

GetChildren

Gets the list of children, filtered by type.

AddComment

Creates a new child Comment.

AddFigure

Creates a new child Figure.

AddImage

Creates a new child Image.

ReloadProperties

Reload properties to update properties provided by the provider.

Connect

Register the python code.

Delete

Run the Delete action.

Activate

Activate the current object.

CopyTo

Copies all visible properties from this object to another.

Duplicate

Creates a copy of the current DataModelObject.

GroupAllSimilarChildren

Run the GroupAllSimilarChildren action.

GroupSimilarObjects

Run the GroupSimilarObjects action.

PropertyByName

Get a property by its unique name.

PropertyByAPIName

Get a property by its API name.

CreateParameter

Creates a new parameter for a Property.

GetParameter

Gets the parameter corresponding to the given property.

RemoveParameter

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

InternalObject

Gets the internal object. For advanced usage only.

Mode

Gets or sets the Mode.

DisplayTime

Gets or sets the DisplayTime.

By

Gets or sets the By.

Location

Gets or sets the Location.

DataModelObjectCategory

Gets the current DataModelObject’s category.

Children

Gets the list of children.

Comments

Gets the list of associated comments.

Figures

Gets the list of associated figures.

Images

Gets the list of associated images.

Text

Gets or sets the text in the script tab for the Python Code object.

PropertyProvider

Gets or sets the propperty provider instance associated with this python code object.

InternalObject

Gets the internal object. For advanced usage only.

ScriptExecutionScope

The scope identifier in which the code execution will take place.

Connected

Gets whether the callbacks are currently connected.

InternalObject

Gets the internal object. For advanced usage only.

Properties

Gets the list of properties for this object.

VisibleProperties

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

Property detail#

property PythonResult.InternalObject: Ansys.Common.Interop.DSObjectsAuto.IDSScriptDefinedResultAuto | None

Gets the internal object. For advanced usage only.

property PythonResult.Mode: System.UInt32 | None

Gets or sets the Mode.

property PythonResult.DisplayTime: Ansys.Core.Units.Quantity | None

Gets or sets the DisplayTime.

property PythonResult.By: Ansys.Mechanical.DataModel.Enums.SetDriverStyle | None

Gets or sets the By.

property PythonResult.Location: Ansys.ACT.Interfaces.Common.ISelectionInfo | None

Gets or sets the Location.

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

Gets the current DataModelObject’s category.

property PythonResult.Children: System.Collections.Generic.IList[Ansys.Mechanical.DataModel.Interfaces.IDataModelObject] | None

Gets the list of children.

property PythonResult.Comments: System.Collections.Generic.IEnumerable[Ansys.ACT.Automation.Mechanical.Comment] | None

Gets the list of associated comments.

property PythonResult.Figures: System.Collections.Generic.IEnumerable[Ansys.ACT.Automation.Mechanical.Figure] | None

Gets the list of associated figures.

property PythonResult.Images: System.Collections.Generic.IEnumerable[Ansys.ACT.Automation.Mechanical.Image] | None

Gets the list of associated images.

property PythonResult.Text: System.String | None

Gets or sets the text in the script tab for the Python Code object.

property PythonResult.PropertyProvider: Ansys.ACT.Interfaces.Mechanical.IPropertyProvider | None

Gets or sets the propperty provider instance associated with this python code object.

property PythonResult.InternalObject: Ansys.Common.Interop.DSObjectsAuto.IDSPythonCodeAuto | None

Gets the internal object. For advanced usage only.

property PythonResult.ScriptExecutionScope: System.String | None

The scope identifier in which the code execution will take place.

property PythonResult.Connected: System.Boolean | None

Gets whether the callbacks are currently connected.

property PythonResult.InternalObject: System.Object | None

Gets the internal object. For advanced usage only.

property PythonResult.Properties: System.Collections.Generic.IReadOnlyList[Ansys.ACT.Automation.Mechanical.Property] | None

Gets the list of properties for this object.

property PythonResult.VisibleProperties: System.Collections.Generic.IReadOnlyList[Ansys.ACT.Automation.Mechanical.Property] | None

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

Method detail#

PythonResult.Evaluate() System.Void

Evaluate method.

PythonResult.EvaluateAllResults() System.Void

Evaluate all results.

PythonResult.ClearGeneratedData() System.Void

ClearGeneratedData method.

PythonResult.ExportAnimation(filePath: System.String, format: Ansys.Mechanical.DataModel.Enums.GraphicsAnimationExportFormat, settings: Ansys.Mechanical.Graphics.AnimationExportSettings) System.Void

Run the ExportAnimation action.

PythonResult.GetChildren(recurses: System.Boolean, children: System.Collections.Generic.IList[ChildrenType]) System.Collections.Generic.IList[ChildrenType]

Gets the list of children, filtered by type.

PythonResult.GetChildren(category: Ansys.Mechanical.DataModel.Enums.DataModelObjectCategory, recurses: System.Boolean, children: System.Collections.Generic.IList[Ansys.Mechanical.DataModel.Interfaces.IDataModelObject]) System.Collections.Generic.IList[Ansys.Mechanical.DataModel.Interfaces.IDataModelObject]

Gets the list of children, filtered by type.

PythonResult.AddComment() Ansys.ACT.Automation.Mechanical.Comment

Creates a new child Comment.

PythonResult.AddFigure() Ansys.ACT.Automation.Mechanical.Figure

Creates a new child Figure.

PythonResult.AddImage(filePath: System.String) 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.
PythonResult.ReloadProperties() System.Void

Reload properties to update properties provided by the provider.

PythonResult.Connect() System.Void

Register the python code.

PythonResult.Delete() System.Void

Run the Delete action.

PythonResult.Activate() System.Void

Activate the current object.

PythonResult.CopyTo(other: Ansys.ACT.Automation.Mechanical.DataModelObject) System.Void

Copies all visible properties from this object to another.

PythonResult.Duplicate() Ansys.Mechanical.DataModel.Interfaces.IDataModelObject

Creates a copy of the current DataModelObject.

PythonResult.GroupAllSimilarChildren() System.Void

Run the GroupAllSimilarChildren action.

PythonResult.GroupSimilarObjects() Ansys.ACT.Automation.Mechanical.TreeGroupingFolder

Run the GroupSimilarObjects action.

PythonResult.PropertyByName(name: System.String) Ansys.ACT.Automation.Mechanical.Property

Get a property by its unique name.

PythonResult.PropertyByAPIName(name: System.String) 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.
PythonResult.CreateParameter(propName: System.String) Ansys.ACT.Interfaces.Mechanical.IParameter

Creates a new parameter for a Property.

PythonResult.GetParameter(propName: System.String) Ansys.ACT.Interfaces.Mechanical.IParameter

Gets the parameter corresponding to the given property.

PythonResult.RemoveParameter(propName: System.String) System.Void

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