How to find if the execution of command is complete ?

How to find if the execution of command is complete ?

Anonymous
Not applicable
1,095 Views
1 Reply
Message 1 of 2

How to find if the execution of command is complete ?

Anonymous
Not applicable

From a button click I am posting a command . How could I know whether the command execution is complete ?

0 Likes
1,096 Views
1 Reply
Reply (1)
Message 2 of 2

jeremytammik
Autodesk
Autodesk

Here is one approach that you can try out:

 

  • Before launching your command, subscribe to the Idling event.
  • Ignore all calls to your event handler that arrive before launching the command.
  • While your command is executing, I believe that no calls will be made.
  • After launching your command, when your handler is called, it means that the command has terminated.

  

Another idea:

 

  • When you make your PostCommand call, call two different separate custom external commands in sequence.
  • Number one is the one you really use.
  • Number two is just a notification to be informed when number one has completed.

 

Please try it out and share your solution with us.

 

Thank you!

 

Cheers,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder