Help: Can't trigger action

var mgr = MainWindow.getActionMgr();func = mgr.findAction("DzBindingGeneralMapAction")func.trigger();
The output for this is: (line 5) TypeError: Result of expression 'func' [null] is not an object. So I guess it can't find DzBindingGeneralMapAction.
Is there a way to execute that action?
Post edited by laikennus on
Comments
For some reason, some actions have a name of DzAction, and so cannot be found this way.
Try this
Thank you very much Omniflux! That did it!
Rob has a script to help with finding the names to use for actions http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/actions/action_find_classname/start
Unfortunately the documentation you link to is using an older classname.
Thanks Rob!
With that information, your original code can be used as such:
Do note that DzActionMgr::findAction() uses the action's classname, not its name.
That's great! Thank you very much Omniflux and Richard!