LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Show & hide sub vi

Solved!
Go to solution
Hi Jarrod,

Thanks for the example VIs.  I've tried using them for a slightly different objective and found that the FP.State property doesn't work quite as I'd expected - perhaps you can clarify what's going on or offer an alternative.

I have a main LV screen that pops up a dialog.  I've written a little VI that changes the position of the subVI after it's been called, centering it on the parent VI (using FP properties).  This works well, except that the user can see the subVI pop up in it's default position for a split-second before it relocates to be centered.  In order to get around this I'd hoped to uncheck the "Show front panel when called" in VI Properties->Window Appearance for the subVI, and then after calling my CenterOnParent routine, use your "Show VI" to make the Dlg visible.

I've done as described above, however my sub-VI never shows itself (and since it's modal it locks all VIs and I have to terminate LV manually).

Any idea how to Show a VI programmatically after it's been loaded and run without the front panel shown?

Thanks for the help!

Daniel
0 Kudos
Message 11 of 13
(1,056 Views)
Daniel,

What you will want to do is open a VI Reference to the SubVI you are calling.  You will then use an Invoke Node and use the "Front Panel - Open" property do perform this operation.
Regards,

Jared Boothe
Staff Hardware Engineer
National Instruments
Message 12 of 13
(1,037 Views)
Worked like a charm - thanks!
0 Kudos
Message 13 of 13
(1,016 Views)