PythonCode#

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

Bases: object

Defines a PythonCode.

Overview#

Activate

Activate the current object.

ClearSelectionBySubset

ClearSelectionBySubset method.

Connect

Register the python code.

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.

GetAPIName

Property name bound to dispId.

GetAllProperties

GetAllProperties method.

GetCustomPropertyByPath

GetCustomPropertyByPath method.

GetDetailsView

GetDetailsView method.

GetEnumName

Enum name bound to value

GetHashCode

GetHashCode method.

GetIconFile

GetIconFile method.

GetLifetimeService

GetLifetimeService method.

GetNewSubsetId

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

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.

ReloadProperties

Reload properties to update properties provided by the provider.

RemoveParameter

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

ResetPropertyProviderText

Resets the code inside the property provider tab with default property provider text. Any changes made to the property provider text are lost.

SetSelectionBySubset

SetSelectionBySubset method.

ToString

ToString method.

AllowRecursion

Gets or Sets whether the PythonCode allows recursion.

AttachedRefs

AttachedRefs property.

ClsId

ClsId property.

Connected

Gets whether the callbacks are currently connected.

DSAttachedObject

DSAttachedObject property.

DataModelObjectCategory

Gets the current DataModelObject's category.

GroupingFolder

GroupingFolder property.

HasPropertyProviderCodeChanged

HasPropertyProviderCodeChanged property.

IconName

IconName property.

InternalObject

Gets the internal object. For advanced usage only.

IsEventBased

Gets the IsEventBased.

Name

Name property.

ObjectId

ObjectId property.

ObjectState

ObjectState property.

ObjectTags

ObjectTags property.

Parent

Parent property.

Properties

Gets the list of properties for this object.

PropertyProvider

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

PropertyProviderText

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

ScriptEngineType

Gets or sets what type of engine used to execute the scripts associated with the Python Code object.

ScriptExecutionScope

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

State

State property.

Text

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

VisibleProperties

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

Property detail#

property PythonCode.AllowRecursion: bool | None#

Gets or Sets whether the PythonCode allows recursion.

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

AttachedRefs property.

property PythonCode.ClsId: int | None#

ClsId property.

property PythonCode.Connected: bool | None#

Gets whether the callbacks are currently connected.

property PythonCode.DSAttachedObject: Ansys.Common.Interop.DSObjects.IDSAttached | None#

DSAttachedObject property.

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

Gets the current DataModelObject's category.

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

GroupingFolder property.

property PythonCode.HasPropertyProviderCodeChanged: bool | None#

HasPropertyProviderCodeChanged property.

property PythonCode.IconName: str | None#

IconName property.

property PythonCode.InternalObject: Ansys.Common.Interop.DSObjectsAuto.IDSPythonCodeAuto | None#

Gets the internal object. For advanced usage only.

property PythonCode.IsEventBased: bool | None#

Gets the IsEventBased.

property PythonCode.Name: str | None#

Name property.

property PythonCode.ObjectId: int | None#

ObjectId property.

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

ObjectState property.

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

ObjectTags property.

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

Parent property.

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

Gets the list of properties for this object.

property PythonCode.PropertyProvider: Ansys.ACT.Interfaces.Mechanical.IPropertyProvider | None#

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

property PythonCode.PropertyProviderText: str | None#

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

property PythonCode.ScriptEngineType: Ansys.Mechanical.DataModel.MechanicalEnums.Scripting.EngineType | None#

Gets or sets what type of engine used to execute the scripts associated with the Python Code object.

property PythonCode.ScriptExecutionScope: str | None#

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

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

State property.

property PythonCode.Text: str | None#

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

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

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

Method detail#

PythonCode.Activate() None#

Activate the current object.

PythonCode.ClearSelectionBySubset(subsetId: int) None#

ClearSelectionBySubset method.

PythonCode.Connect() None#

Register the python code.

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

Copies all visible properties from this object to another.

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

CreateObjRef method.

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

Creates a new parameter for a Property.

PythonCode.Delete() None#

Run the Delete action.

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

Creates a copy of the current DataModelObject.

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

Equals method.

PythonCode.GetAPIName(dispId: int) str#

Property name bound to dispId.

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

GetAllProperties method.

PythonCode.GetCustomPropertyByPath(propertyPath: str) Ansys.ACT.Mechanical.AdditionalProperties.CustomProperty#

GetCustomPropertyByPath method.

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

GetDetailsView method.

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

Enum name bound to value

PythonCode.GetHashCode() int#

GetHashCode method.

PythonCode.GetIconFile() System.Byte#

GetIconFile method.

PythonCode.GetLifetimeService() Any#

GetLifetimeService method.

PythonCode.GetNewSubsetId() int#

GetNewSubsetId method.

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

GetObjectData method.

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

Gets the parameter corresponding to the given property.

PythonCode.GetPath() str#

GetPath method.

PythonCode.GetPropertyName(dispId: int) str#

GetPropertyName method.

PythonCode.GetPropertyValue(name: str) Any#

GetPropertyValue method.

PythonCode.GetType() type#

GetType method.

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

GetVisibleProperties method.

PythonCode.GetVisiblePropertyNames() List[str]#

GetVisiblePropertyNames method.

PythonCode.GroupAllSimilarChildren() None#

Run the GroupAllSimilarChildren action.

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

Run the GroupSimilarObjects action.

PythonCode.InitializeLifetimeService() Any#

InitializeLifetimeService method.

PythonCode.IsPropertyEditable(dispId: int) bool#

IsPropertyEditable method.

PythonCode.IsPropertyVisible(dispId: int) bool#

IsPropertyVisible method.

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

PropertyById method.

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

Get a property by its unique name.

PythonCode.ReloadProperties() None#

Reload properties to update properties provided by the provider.

PythonCode.RemoveParameter(propName: str) None#

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

PythonCode.ResetPropertyProviderText() None#

Resets the code inside the property provider tab with default property provider text. Any changes made to the property provider text are lost.

PythonCode.SetSelectionBySubset(info: Ansys.ACT.Interfaces.Common.ISelectionInfo, subsetId: int, notifyChange: bool) None#

SetSelectionBySubset method.

PythonCode.ToString() str#

ToString method.