10-08-2019 02:31 AM
Hello Community,
Is there a way to hide a VI from the taskbar (and also the window itself) during development in a way that it reappears if the VI is stopped?
I can use the property node to set the Front panel status of the VI to hidden and then at the end of the code I can use the property node again to set the FP status to normal again, but if the VI is force stopped and this last part of the code doesn't get executed then the VI remains open, but hidden. (so I need to browse it from the project explorer again, double-click on it to display the opened instance again)
Thanks for you input.
10-08-2019 02:41 AM
Hi 1984,
but if the VI is force stopped and this last part of the code doesn't get executed then the VI remains open, but hidden.
Why do you even need to "force stop" that VI?
No program should need to "force stop". It's like using a tree to stop your car…
10-08-2019 03:16 AM
I'm debugging man... things may not work as they supposed to.
FYI: when an engine or car part is under development there are sudden and unexpected stops. When you buy your car you expect nothing like that, but during the development... yes, it happens even with a car. (and pretty much with everything under development)
10-08-2019 03:21 AM
Hi 1984,
even when debugging you can ensure that atleast the code which handles that window state/visibility is executed before you stop your debugging environment…
(Example: your subVI may use a QSM to handle request from MainVI. You can use an additional DebuggingVI to send a regular "quit" command into the queue of your subVI instead of hitting that big red stop button in the menu bar!)
10-08-2019 04:00 AM
One approach would be to have a VI which you run manually after an abort, which iterates through all VIs in memory and sets the Front Panel state to Standard if it is currently set to Hidden.
10-08-2019 04:04 AM - edited 10-08-2019 04:05 AM
Hey 1984,
Perhaps this is helpful to you. I have two Vi's - Time.vi and Observer.vi
The Test.vi:
And the Observer.vi:
I hope I understood what you want to do. I run the Time.vi from Observer.vi and if the Time.vi is aborted, an error is thrown, at which point you can open the front panel of Time.vi.
So perhaps you can run a loop that observes the vi in question, since open vi is a reference to vi on disk somewhere. I hope it helps.
10-08-2019 06:23 AM
Why not leave the vi unhidden during debugging that might require a force stop. You can put that functionality back in once you're finished debugging.