CommandSnippet#

class ansys.mechanical.stubs.v242.Ansys.ACT.Automation.Mechanical.CommandSnippet#

Bases: object

Defines a CommandSnippet.

Overview#

AppendText

Append Text.

ImportTextFile

Import from Textfile.

ExportTextFile

Export to Textfile.

RenameBasedOnDefinition

Run the RenameBasedOnDefinition action.

Delete

Run the Delete 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.

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.

Input

Gets or sets the Text.

OutputParameters

Gets a list of the command snippet’s output parameters.

InternalObject

Gets the internal object. For advanced usage only.

InputArgument1

Gets or sets the InputArgument1.

InputArgument2

Gets or sets the InputArgument2.

InputArgument3

Gets or sets the InputArgument3.

InputArgument4

Gets or sets the InputArgument4.

InputArgument5

Gets or sets the InputArgument5.

InputArgument6

Gets or sets the InputArgument6.

InputArgument7

Gets or sets the InputArgument7.

InputArgument8

Gets or sets the InputArgument8.

InputArgument9

Gets or sets the InputArgument9.

OutputSearchPrefix

Gets or sets the OutputSearchPrefix.

StepNumber

Gets or sets the StepNumber.

FileName

Gets the FileName.

SnippetFileStatus

Gets the SnippetFileStatus.

StepSelectionMode

Gets or sets the StepSelectionMode.

SolverTarget

Gets the SolverTarget.

IssueSolveCommand

Gets or sets the IssueSolveCommand.

InvalidateSolution

Gets or sets the InvalidateSolution.

Suppressed

Gets or sets the Suppressed.

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.

ReadOnly

Gets or sets the ReadOnly.

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 CommandSnippet.Input: System.String | None

Gets or sets the Text.

property CommandSnippet.OutputParameters: System.Collections.Generic.IReadOnlyList[Ansys.ACT.Automation.Mechanical.CommandOutputParameter] | None

Gets a list of the command snippet’s output parameters.

property CommandSnippet.InternalObject: Ansys.Common.Interop.DSObjectsAuto.IDSCommandEditorAuto | None

Gets the internal object. For advanced usage only.

property CommandSnippet.InputArgument1: System.String | None

Gets or sets the InputArgument1.

property CommandSnippet.InputArgument2: System.String | None

Gets or sets the InputArgument2.

property CommandSnippet.InputArgument3: System.String | None

Gets or sets the InputArgument3.

property CommandSnippet.InputArgument4: System.String | None

Gets or sets the InputArgument4.

property CommandSnippet.InputArgument5: System.String | None

Gets or sets the InputArgument5.

property CommandSnippet.InputArgument6: System.String | None

Gets or sets the InputArgument6.

property CommandSnippet.InputArgument7: System.String | None

Gets or sets the InputArgument7.

property CommandSnippet.InputArgument8: System.String | None

Gets or sets the InputArgument8.

property CommandSnippet.InputArgument9: System.String | None

Gets or sets the InputArgument9.

property CommandSnippet.OutputSearchPrefix: System.String | None

Gets or sets the OutputSearchPrefix.

property CommandSnippet.StepNumber: System.Int32 | None

Gets or sets the StepNumber.

property CommandSnippet.FileName: System.String | None

Gets the FileName.

property CommandSnippet.SnippetFileStatus: System.Int32 | None

Gets the SnippetFileStatus.

property CommandSnippet.StepSelectionMode: Ansys.Mechanical.DataModel.Enums.SequenceSelectionType | None

Gets or sets the StepSelectionMode.

property CommandSnippet.SolverTarget: Ansys.Mechanical.DataModel.Enums.CommandEditorTarget | None

Gets the SolverTarget.

property CommandSnippet.IssueSolveCommand: System.Boolean | None

Gets or sets the IssueSolveCommand.

property CommandSnippet.InvalidateSolution: System.Boolean | None

Gets or sets the InvalidateSolution.

property CommandSnippet.Suppressed: System.Boolean | None

Gets or sets the Suppressed.

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

Gets the current DataModelObject’s category.

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

Gets the list of children.

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

Gets the list of associated comments.

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

Gets the list of associated figures.

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

Gets the list of associated images.

property CommandSnippet.ReadOnly: System.Boolean | None

Gets or sets the ReadOnly.

property CommandSnippet.InternalObject: System.Object | None

Gets the internal object. For advanced usage only.

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

Gets the list of properties for this object.

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

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

Method detail#

CommandSnippet.AppendText(NewText: System.String) System.Void

Append Text.

CommandSnippet.ImportTextFile(TextFile: System.String) System.Void

Import from Textfile.

CommandSnippet.ExportTextFile(TextFile: System.String) System.Void

Export to Textfile.

CommandSnippet.RenameBasedOnDefinition() System.Void

Run the RenameBasedOnDefinition action.

CommandSnippet.Delete() System.Void

Run the Delete action.

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

Gets the list of children, filtered by type.

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

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

Creates a new child Comment.

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

Creates a new child Figure.

CommandSnippet.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.
CommandSnippet.Activate() System.Void

Activate the current object.

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

Copies all visible properties from this object to another.

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

Creates a copy of the current DataModelObject.

CommandSnippet.GroupAllSimilarChildren() System.Void

Run the GroupAllSimilarChildren action.

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

Run the GroupSimilarObjects action.

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

Get a property by its unique name.

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

Creates a new parameter for a Property.

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

Gets the parameter corresponding to the given property.

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

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