07-29-2019
04:31 PM
- last edited on
12-09-2024
05:04 PM
by
Content Cleaner
What's a simple way of Terminating All, then exiting a UI application with a single button? I'm curious how to know when the Terminate All is really done so I can exit the app and it won't prompt me with the "executions are currently running" dialogue.
I'm using something similar to the Simple User Interface Example UI with a sequential model and I use the TestUUTs entry point so it repeats until the user clicks "Exit". I'd like this single button to terminate TestStand and close the UI.
I'm thinking something like...
Links:
TestStand Help Shutting Down the Engine
Forum Post TestStand AP Terminae All Notification
07-30-2019 08:22 AM
What about using the time limits?
You can set it to automatically terminate on Exit and basically get this behavior. The trick is that your sequence needs to respond appropriately to termination (e.g. any long-running tests need to use the Termination Monitor API).
There are also time limits and options for Terminating and Aborting, so you can trade off closing down with an increasing degree of urgency for the possibility of not running clean-up code and leaving instrument handles open.
Hope this helps!
Trent
07-31-2019 01:17 PM
Thanks for your reply. Interesting idea; I hadn't thought of using the Station Options.
However, I'm still a bit confused on how to best initiate the exit without getting a prompt saying do you really want to exit with current executions still running.
Maybe something like would be OK? I tried it successfully with nothing very obviously bad happening.
07-31-2019 01:56 PM
You mean the "Incomplete Executions" prompt? I'm not aware of any way to get around that... You need to make sure this button terminates all executions (and that they're done terminating, which is where the time limits come in handy) before you fire the exit command.
-Trent