How to close/destroy a command dialog

How to close/destroy a command dialog

fatalbullethit
Participant Participant
843 Views
2 Replies
Message 1 of 3

How to close/destroy a command dialog

fatalbullethit
Participant
Participant

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()
0 Likes
Accepted solutions (2)
844 Views
2 Replies
Replies (2)
Message 2 of 3

j4n.vokurka
Advocate
Advocate
Accepted solution

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

fatalbullethit
Participant
Participant
Accepted solution

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()

 

 

 

0 Likes