Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I noticed onExecute event fired when I move a project with taking out command GUI.
When I pushed the OK button, I want to run [OK] processing.
When I movied project, I want to run [cancel] processing.
However, I think that I cannot distinguish me with the argument of onExecute.
(The left image is OK pressed eventArgs, the right when moved project. I think same two)
class CommandCreatedHandler(adsk.core.CommandCreatedEventHandler):
def __init__(self):
super().__init__()
def notify(self, args):
cmd = adsk.core.Command.cast(args.command)
onExecute = ExecuteHandler()
cmd.execute.add(onExecute)
_handlers.append(onExecute)
# omit other code
class ExecuteHandler(adsk.core.CommandEventHandler):
def __init__(self):
super().__init__()
def notify(self, args):
eventArgs = adsk.core.CommandEventArgs.cast(args) # <- Dump this
# [OK] processing
# omit other code
What should I do?
Regards,
Solved! Go to Solution.