Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is it safe to have only a CommandCreated handler?

1 REPLY 1
SOLVED
Reply
Message 1 of 2
quality5B59E
214 Views, 1 Reply

Is it safe to have only a CommandCreated handler?

 

Is it safe to do things in the CommandCreated handler instead of installing

an Execute handler and doing it there?   I imagine the transaction stuff gets

bypassed but for simple things is it safe?

 

 

class HomePoseCommandCreatedHandler(adsk.core.CommandCreatedEventHandler):
    def __init__(self):
        super().__init__()              
    def notify(self, args):
# do simple command here instead of installing Execute handler move_to_home_pose()
1 REPLY 1
Message 2 of 2
goyals
in reply to: quality5B59E

I do not think it is mandatory to have a commandExecuteHandler. Please take a look at this example http://help.autodesk.com/view/fusion360/ENU/?guid=GUID-e5c4dbe8-ee48-11e4-9823-f8b156d7cd97 but as you already mentioned the things done as part of command would not be persisted.



Shyam Goyal
Sr. Software Dev. Manager

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report