LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

closing windows

is it possible to close one VI's window from within another VI's code?

Cheers,
John
0 Kudos
Message 1 of 6
(3,377 Views)
Sure, use "Open VI Reference" to get a reference to the VI. Then use a "Property Node" to write a Boolean FALSE value to the VI's "Front Panel Window::Open" property. Finally close the VI's reference using "Close LV Object Reference".

When you open the VI Reference you can wire in either the name (as a string) or the path of the VI into the "vi path" input of "Open VI Reference"

Good luck,

Jim
Message 2 of 6
(3,377 Views)
Cheers Jim!!

"Jim Kring" wrote in message
news:50650000000500000028D70000-1042324653000@exchange.ni.com...
> Sure, use "Open VI Reference" to get a reference to the VI. Then use
> a "Property Node" to write a Boolean FALSE value to the VI's "Front
> Panel Window::Open" property. Finally close the VI's reference using
> "Close LV Object Reference".
>
> When you open the VI Reference you can wire in either the name (as a
> string) or the path of the VI into the "vi path" input of "Open VI
> Reference"
>
> Good luck,
>
> Jim
0 Kudos
Message 3 of 6
(3,376 Views)
where to find the VI's "Front Panel Window:pen" property? I want to open a VI dialog window from a main vi program. the dialog window will keep communication with the main vi window. The dialog is only closed when a  "close" button in main vi window is pressed. I set the VI's execution property to be "standard" then the vi will keep communicate with the main vi, but I do not know how to close the dialog vi anymore. please help.

Thank you
0 Kudos
Message 4 of 6
(3,246 Views)
Hey NN Q,

If you would like to open a VI on your computer you first need to place a Open VI Reference function donw on the block diagram.  Once you have configured the path to the VI you want to access you can then wire the VI reference to a Property Node.  This will give you access to many different properties.  Use the operate tool to click the node and bring up the properties available and select Front Panel Window » Open.  You can then use a Invoke Node to run the VI if necessary.  Once you get a close from the main window you can stop the VI and close the front panel.  You can close the VI by stopping the VI, making the Front Panel not visible (write a False to the FP.Open property) and closing the reference.

Repost if you want more help!
Andy F.
-----------------------------------------------------------------
National Instruments
0 Kudos
Message 5 of 6
(3,225 Views)

Hi, please find examples from this thread useful 🙂

Look for VS_Call_Subvi.zip  or  VS_Pass_Data.zip

Cheers!

 

Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 6 of 6
(3,221 Views)