Most often controlling the closing and opening of the panel is done
from the VI properties -> window appearance setup, there you can set
whether the VIs front panel should open when called or loaded and
whether it should close when finished. The same properties can be
set/overrun when calling the VI in the sub-VI node setup which you can
access by right-clicking on the sub-VI.

However - you can also open and close front panels using property
nodes or methods. If you get a reference to the VI and set it's front
panel open property to false you close the window and vice versa.
Using an invoke node there is a method called Open FP...lot's of
options in other words.

You'll need to make sure the data flow is correct though; it does not
help to close a window if you really need the VI to stop and unload
e.g.

Closing the last open front panel by making all code end and then set
the front panel open property to false is the cleanest way to exit a
built application by the way; unlike using the quit function the last
window will dissapear instantly, no flashing of a halted VI window (In
my oppinion NI should modify this function so that it does not do this
in built applications...but anyaway).

Reply via email to