We’re putting the final touches on our new badges platform. Badge issuance remains temporarily paused, but all completions are being recorded and will be fulfilled once the platform is live. Thank you for your patience.

Ansys Learning Forum Forums Discuss Simulation General Mechanical Active mechanical system name in ACT scrippting Reply To: Active mechanical system name in ACT scrippting

IKER GOMEZ
Subscriber

A way of finding the system Name from Mechanical could be based on the WorkingDirectory:
On Mechanical:

WBcmd = “\n” + “SYSFolder=” + “‘” + ExtAPI.DataModel.Project.Model.Analyses[0].WorkingDir.Split(“\\”)[-3] + “‘”
WBcmd =WBcmd + “””
for system in GetAllSystems():
if ACT.GetEntityProperty(system.GetComponent(“Model”),’DirectoryName’) == SYSFolder:
returnValue(system.Name)
“””
system_name=wbjn.ExecuteCommand(ExtAPI,WBcmd)