Ansys Employee



for executing an existing mechanical code, you should be able to use python code object in your model: 

Also, to send Mechanical commands from the workbench you can use:

If the ACT python commands are directly being sent without an extension one can use the SendCommand API

system = GetSystem(Name=”SYS”) # Specify system name, or
#system = GetAllSystems()[0] # get first system
model = system.GetContainer(ComponentName=”Model”)
model.SendCommand(Language=”Python”, Command=string)

If the python commands that are being sent from Workbench Journal are a part of a Mechanical extension, then use the following commands:

string=”’ExtAPI.ExtensionManager.GetExtensionByName(‘Extension name’).ScriptScope.My_Python_command()”'
model.SendCommand(Language=”Python”, Command=string)


How to access Ansys help links

Guidelines for Posting on Ansys Learning Forum