LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Same VI, different window appearance

 
I would like to use the same VI either as a stand alone function or as being called as a Sub-VI from a different application.
 
As a standalone, I have been using VI properties, window appearance = Top Level.
As a sub,  I have been using VI properties, window appearance = Dialog.
 
But then I have two different VIs.
 
I am sure this is easy for someone who knows what they are doing; however, for me...
 
I am using LabView 7.1.1
Thanks in advance
 
0 Kudos
Message 1 of 2
(2,423 Views)

Hi,

 

I can't find an easy property that sets a VIs Appearance programmatically.  SO, you will have to set all the elements (top level vs. dialog) one by one.  It shouldn't be that bad though.

 

I made you a quick mock up VI that tells you if the VI is running top level or as a sub VI (VI class porperty >> Execution >> Execution State).  Then wire that into a case sturucture, then right click the case structure and select Add Case For Every Value.  Outside the case structure put down a property node, and find each propety that you wnat to change.  For the mock up, I used Show Menu Bar, and the Show scroll Bar properties.  If top level, both are true, otherwise they are false.

Run the VI (called sub VI) top level and you will see one behavior.  Drop it down as a sub VI, and run the top level VI, and notice the other behavior.

 

Now you just need to find the properties you want to set (unless there is an easier way to go from top level to dialog that I can't remember...).

 

let me know if you have any questions.

J

 

0 Kudos
Message 2 of 2
(2,412 Views)