Change System names
Erik Kostson
Member, Employee Posts: 233
✭✭✭✭
How to change the System name on WB Project page using the Mechanical ACT console?
Tagged:
0
Best Answers
-
import wbjn
ScriptCmds = """
for index, system in enumerate(GetAllSystems()):
system.DisplayText = "MySystem_%s" % index
"""
wbjn.ExecuteCommand(ExtAPI, ScriptCmds)0 -
This works only within the workbench scripting console/shell:
for index, system in enumerate(GetAllSystems()): system.DisplayText = "MySystem_%s" % index
This works only within the Mechanical :
def Test(): ScriptCmds =r""" for index, system in enumerate(GetAllSystems()): system.DisplayText = "System_%s" % index """ import wbjn wbjn.ExecuteCommand(ExtAPI, ScriptCmds) thread=System.Threading.Thread(System.Threading.ThreadStart(Test)) thread.Start()
2