LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

close a subvi

I use a sub vi to automatically open and run another vi
However I want to close the vi that opens. i want to do this automatically. How can I do that?
0 Kudos
Message 1 of 2
(2,617 Views)
There are multiple ways of opening and closing a sub-VIs front panel.
If you want to do it automatically anytime the sub-VI is called, on the sub-VIs window, goto File >> VI Properties >> Window Appearance >> Customize, and place a checkmark on Show Front Panel When Called and Close Afterwards if Originally Closed. Then re-save the sub-VI.
If you want to do it automatically but not in every place it's used, on the diagram of the calling VI, right-click on the sub-VI and select SubVI Node Setup and place a checkmark on Show Front Panel When Called and Close Afterwards if Originally Closed. Now only this instance of the sub-VI will have its front panel opened and closed by the calling VI. Other instances of the sub-VI won't.
If you need more programmatic control ove
r opening and closing a sub-VI, you can use a VI Server. Look at the VI Server examples that ship with LabView. I have one application where I wanted to open a VI's front panel without running it, and leaving that panel open when the main VI ended. I needed to use a VI Server to do it.
Message 2 of 2
(2,617 Views)