How do I run an ACT extension specific command in the general WB Scripting Console?

Ayush Kumar
Member, Moderator, Employee Posts: 472
✭✭✭✭
How can I call any extension specific functions in the general WB scripting console?
For example, I have an extension called "FutureERA" and to call functions specific to that extension I can manually switch scoping to "FutureERA" and call the methods. Is there a way to do it without switching the scope? This is needed if one wants to call methods in WB Console from Mechanical Console using wbjn.ExecuteCommands
.
Tagged:
0
Answers
-
You can do that by retrieving the extension in the general WB Console and use the
ExecuteCommand
function of the extension. For example, if you want to call an extension specific method -MyMethod
in the WB console from Mechanical console you need to useExecuteCommand
on two levels:cmd = """ fera = ExtAPI.ExtensionManager.GetExtensionByName('FutureERA') fera.ExecuteCommand('MyMethod(Arg1, Arg2)') """ import wbjn wbjn.ExecuteCommand(ExtAPI, cmd)
2