LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

subvi containing controls should use already existing window

Hello,

I am building a User Interface that has several levels (main vi, several
second and third level subvis. The second level subvi contains
controls, so it opens a new window when called,
but it should clear the already existing window of the main vi, use this
window and restore the main vi after completion.

The third level subvis add some more controls to the second level subvis',
so they should use their window, but without clearing the second level subvis.

How can this be done?

Thanks

Thomas
0 Kudos
Message 1 of 3
(2,581 Views)
I change my main screen controls and indicators all the time using references. I had to, since my one project had almost 100 controls and indicators (on tab controls) for the user to input data. With that many controls and indicators, direct wiring to subVIs would have been such a mess.

But... back to what you want. Basically, you open a reference to the VI that you want to access controls/indicators on and use Invoke nodes to Set Control Value or Get Control Value. Don't forget to close your reference when you're done with it.

I have included my library that I use for these functions so you can see how I do it. Have fun.

Rob
0 Kudos
Message 2 of 3
(2,581 Views)
I want to endorse Rob Cole's method. I have used referenced to make controls invisible and disabled. This produces really neat VIs.

You might also be interested in the following link to make windows calls (max, min, restore, etc) calls from LV. I searched for windows utilities.
http://zone.ni.com/devzone/explprog.nsf/6c163603265406328625682a006ed37d/ebf11dd1f0feaef3862566790072a983?OpenDocument

Jeremy Braden
National Instruments
0 Kudos
Message 3 of 3
(2,581 Views)