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: 

How to close/destroy a command dialog

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
fatalbullethit
192 Views, 2 Replies

How to close/destroy a command dialog

I would like to close a command dialog under certain conditions.

I know of a way to start a command dialog...

ui.commandDefinitions.itemById(CMD_ID).execute()

... but I can't find a way to close it.

I'm looking for something like this:

ui.commandDefinitions.itemById(CMD_ID).destroy()
Labels (6)
2 REPLIES 2
Message 2 of 3

I lived under the impression there was access to adsk.terminate() that would destroy the dialog but I wasn't able to find it.

Instead what I found was this discussion that clarified it at least for Python.

Message 3 of 3

Thanks for pointing me in the right direction! 🙂
For future readers, this works as expected (terminating the active command window and triggering the command destroy event):

 

 

ui.terminateActiveCommand()

 

 

 

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report