LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Menubars (get menubar reference of VI)

Hello:
I have an application in which a Main VI calls several subVI that are the user interfaces (say 3 user interfaces A, B and C). I have also 3 boolean preselections that can be enabled or disabled at any time. As they are important I have made access to those using the menu VIs. A parallel VI 'menu checker' checks permanently the state of those menus and refreshes some globals accordingly. The input of 'menu checker' is a global containing the menubar reference. This global is fed by the 'current menubar' when one enters into one of the A, B, C Vi.
In Labview we have some functions that list the VI that are opened and I ideally I would like to pass the name of the frontmost VI to a certain function that would output its menub
ar reference. Therefore avoid going into every single user interface VI to add this 'current menubar' to global stuff.
Thank you very much for any hint,
Chris
0 Kudos
Message 1 of 3
(2,852 Views)
chris from brussels,

Although it would be very helpful, the menu bar of a VI is not available from the VI propeties. A workaround would be that each VI writes its menubar refnum onto an indicator of its front panel and then you can use the VI method "Get Control Value" to obtain the refnum with a VI reference.

However I suggest that each VI A,B,C polls itself if it is frontmost and if it is, writes its menubar refnum to some global control or otherwise notify the "menu checker" of its menubar refnum.


LabVIEW, C'est LabVIEW

Message 2 of 3
(2,852 Views)

I am also quite interested in this problem. Can anyone kindly provide a solution? Thanks!

0 Kudos
Message 3 of 3
(2,440 Views)