CommandSnippet#

class ansys.mechanical.stubs.v261.Ansys.ACT.Automation.Mechanical.CommandSnippet(internalObject: Any)#

Bases: object

Defines a CommandSnippet.

Overview#

Activate

Activate the current object.

AddComment

Creates a new child Comment.

AddFigure

Creates a new child Figure.

AddImage

Creates a new child Image.

AppendText

Append Text.

CopyTo

Copies all visible properties from this object to another.

CreateObjRef

CreateObjRef method.

CreateParameter

Creates a new parameter for a Property.

Delete

Run the Delete action.

Duplicate

Creates a copy of the current DataModelObject.

Equals

Equals method.

ExportTextFile

Export to Textfile.

GetAPIName

Property name bound to dispId.

GetAllProperties

GetAllProperties method.

GetChildren

Gets the list of children, filtered by type.

GetDetailsView

GetDetailsView method.

GetEnumName

Enum name bound to value

GetHashCode

GetHashCode method.

GetIconFile

GetIconFile method.

GetLifetimeService

GetLifetimeService method.

GetObjectData

GetObjectData method.

GetParameter

Gets the parameter corresponding to the given property.

GetPath

GetPath method.

GetPropertyName

GetPropertyName method.

GetPropertyValue

GetPropertyValue method.

GetType

GetType method.

GetVisibleProperties

GetVisibleProperties method.

GetVisiblePropertyNames

GetVisiblePropertyNames method.

GroupAllSimilarChildren

Run the GroupAllSimilarChildren action.

GroupSimilarObjects

Run the GroupSimilarObjects action.

ImportTextFile

Import from Textfile.

InitializeLifetimeService

InitializeLifetimeService method.

IsPropertyEditable

IsPropertyEditable method.

IsPropertyVisible

IsPropertyVisible method.

PropertyByAPIName

Get a property by its API name.

PropertyById

PropertyById method.

PropertyByName

Get a property by its unique name.

RemoveParameter

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

RenameBasedOnDefinition

Run the RenameBasedOnDefinition action.

ToString

ToString method.

AttachedRefs

AttachedRefs property.

Children

Gets the list of children.

ClsId

ClsId property.

Comments

Gets the list of associated comments.

DataModelObjectCategory

Gets the current DataModelObject's category.

Figures

Gets the list of associated figures.

FileName

Gets the FileName.

GroupingFolder

GroupingFolder property.

IconName

IconName property.

Images

Gets the list of associated images.

ImportableObjectSourceId

ImportableObjectSourceId property.

Input

Gets or sets the Text.

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.

InternalObject

Gets the internal object. For advanced usage only.

InvalidateSolution

Gets or sets the InvalidateSolution.

IssueSolveCommand

Gets or sets the IssueSolveCommand.

Name

Name property.

ObjectId

ObjectId property.

ObjectState

ObjectState property.

ObjectTags

ObjectTags property.

OutputParameters

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

OutputSearchPrefix

Gets or sets the OutputSearchPrefix.

Parent

Parent property.

Properties

Gets the list of properties for this object.

ReadOnly

Gets or sets the ReadOnly.

SnippetFileStatus

Gets the SnippetFileStatus.

SolverTarget

Gets the SolverTarget.

State

State property.

StepNumber

Gets or sets the StepNumber.

StepSelectionMode

Gets or sets the StepSelectionMode.

Suppressed

Gets or sets the Suppressed.

TransferableObjectId

TransferableObjectId property.

VisibleProperties

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

Property detail#

property CommandSnippet.AttachedRefs: List[int] | None#

AttachedRefs property.

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

Gets the list of children.

property CommandSnippet.ClsId: int | None#

ClsId property.

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

Gets the list of associated comments.

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

Gets the current DataModelObject's category.

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

Gets the list of associated figures.

property CommandSnippet.FileName: str | None#

Gets the FileName.

property CommandSnippet.GroupingFolder: Ansys.Mechanical.DataModel.Interfaces.IDataModelObject | None#

GroupingFolder property.

property CommandSnippet.IconName: str | None#

IconName property.

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

Gets the list of associated images.

property CommandSnippet.ImportableObjectSourceId: str | None#

ImportableObjectSourceId property.

property CommandSnippet.Input: str | None#

Gets or sets the Text.

property CommandSnippet.InputArgument1: str | None#

Gets or sets the InputArgument1.

property CommandSnippet.InputArgument2: str | None#

Gets or sets the InputArgument2.

property CommandSnippet.InputArgument3: str | None#

Gets or sets the InputArgument3.

property CommandSnippet.InputArgument4: str | None#

Gets or sets the InputArgument4.

property CommandSnippet.InputArgument5: str | None#

Gets or sets the InputArgument5.

property CommandSnippet.InputArgument6: str | None#

Gets or sets the InputArgument6.

property CommandSnippet.InputArgument7: str | None#

Gets or sets the InputArgument7.

property CommandSnippet.InputArgument8: str | None#

Gets or sets the InputArgument8.

property CommandSnippet.InputArgument9: str | None#

Gets or sets the InputArgument9.

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

Gets the internal object. For advanced usage only.

property CommandSnippet.InvalidateSolution: bool | None#

Gets or sets the InvalidateSolution.

property CommandSnippet.IssueSolveCommand: bool | None#

Gets or sets the IssueSolveCommand.

property CommandSnippet.Name: str | None#

Name property.

property CommandSnippet.ObjectId: int | None#

ObjectId property.

property CommandSnippet.ObjectState: Ansys.Mechanical.DataModel.Enums.ObjectState | None#

ObjectState property.

property CommandSnippet.ObjectTags: Iterable[Ansys.Mechanical.DataModel.Interfaces.IObjectTag] | None#

ObjectTags property.

property CommandSnippet.OutputParameters: tuple[Ansys.ACT.Automation.Mechanical.CommandOutputParameter] | None#

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

property CommandSnippet.OutputSearchPrefix: str | None#

Gets or sets the OutputSearchPrefix.

property CommandSnippet.Parent: Ansys.Mechanical.DataModel.Interfaces.IDataModelObject | None#

Parent property.

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

Gets the list of properties for this object.

property CommandSnippet.ReadOnly: bool | None#

Gets or sets the ReadOnly.

property CommandSnippet.SnippetFileStatus: int | None#

Gets the SnippetFileStatus.

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

Gets the SolverTarget.

property CommandSnippet.State: Ansys.Mechanical.DataModel.Enums.Legacy.State | None#

State property.

property CommandSnippet.StepNumber: int | None#

Gets or sets the StepNumber.

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

Gets or sets the StepSelectionMode.

property CommandSnippet.Suppressed: bool | None#

Gets or sets the Suppressed.

property CommandSnippet.TransferableObjectId: str | None#

TransferableObjectId property.

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

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

Method detail#

CommandSnippet.Activate() None#

Activate the current object.

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: str) 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.AppendText(NewText: str) None#

Append Text.

CommandSnippet.CopyTo(other: Ansys.ACT.Automation.Mechanical.DataModelObject) None#

Copies all visible properties from this object to another.

CommandSnippet.CreateObjRef(requestedType: type) System.Runtime.Remoting.ObjRef#

CreateObjRef method.

CommandSnippet.CreateParameter(propName: str) Ansys.ACT.Interfaces.Mechanical.IParameter#

Creates a new parameter for a Property.

CommandSnippet.Delete() None#

Run the Delete action.

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

Creates a copy of the current DataModelObject.

CommandSnippet.Equals(other: Ansys.Mechanical.DataModel.Interfaces.IDataModelObject) bool#

Equals method.

CommandSnippet.ExportTextFile(TextFile: str) None#

Export to Textfile.

CommandSnippet.GetAPIName(dispId: int) str#

Property name bound to dispId.

CommandSnippet.GetAllProperties() List[Ansys.ACT.Automation.Mechanical.AutomationPropertyWrapper]#

GetAllProperties method.

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

Gets the list of children, filtered by type.

CommandSnippet.GetDetailsView() Ansys.ACT.Automation.Mechanical.DetailsViewData#

GetDetailsView method.

CommandSnippet.GetEnumName(enumType: type, value: int, dispId: int) str#

Enum name bound to value

CommandSnippet.GetHashCode() int#

GetHashCode method.

CommandSnippet.GetIconFile() System.Byte#

GetIconFile method.

CommandSnippet.GetLifetimeService() Any#

GetLifetimeService method.

CommandSnippet.GetObjectData(info: System.Runtime.Serialization.SerializationInfo, context: System.Runtime.Serialization.StreamingContext) None#

GetObjectData method.

CommandSnippet.GetParameter(propName: str) Ansys.ACT.Interfaces.Mechanical.IParameter#

Gets the parameter corresponding to the given property.

CommandSnippet.GetPath() str#

GetPath method.

CommandSnippet.GetPropertyName(dispId: int) str#

GetPropertyName method.

CommandSnippet.GetPropertyValue(name: str) Any#

GetPropertyValue method.

CommandSnippet.GetType() type#

GetType method.

CommandSnippet.GetVisibleProperties() List[System.Reflection.PropertyInfo]#

GetVisibleProperties method.

CommandSnippet.GetVisiblePropertyNames() List[str]#

GetVisiblePropertyNames method.

CommandSnippet.GroupAllSimilarChildren() None#

Run the GroupAllSimilarChildren action.

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

Run the GroupSimilarObjects action.

CommandSnippet.ImportTextFile(TextFile: str) None#

Import from Textfile.

CommandSnippet.InitializeLifetimeService() Any#

InitializeLifetimeService method.

CommandSnippet.IsPropertyEditable(dispId: int) bool#

IsPropertyEditable method.

CommandSnippet.IsPropertyVisible(dispId: int) bool#

IsPropertyVisible method.

CommandSnippet.PropertyByAPIName(name: str) 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.PropertyById(dispId: int) Ansys.ACT.Automation.Mechanical.Property#

PropertyById method.

CommandSnippet.PropertyByName(name: str) Ansys.ACT.Automation.Mechanical.Property#

Get a property by its unique name.

CommandSnippet.RemoveParameter(propName: str) None#

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

CommandSnippet.RenameBasedOnDefinition() None#

Run the RenameBasedOnDefinition action.

CommandSnippet.ToString() str#

ToString method.