From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Obtain Current VI's Menubar

Anyone know how to obtain a reference to the Real-Time Menu without using Current VI's Menubar and Event Structure? Is it possible to obtain the reference of the Real-Time Menu from VI Server Reference and Property Node? Thank.
0 Kudos
Message 1 of 11
(4,387 Views)

The only menu-bar properties that are accessible through the VI server are "Front Panel Window: Show Menu Bar" and "Run-Time Menu Path".

 

Why do you need to access through the VI server? You should pass the menu bar reference through to wherever you need it. If you have the Vi reference there already, then you should pass the menu reference the same way.

 

 

I usually structure my class data for my user interface to include a VI reference and menu bar reference. That reference gets set when the interface loads and is then accessible in my data cluster elsewhere.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 2 of 11
(4,380 Views)

Why do you need the Front Panel Menu bar for a VI running on an operating system that doesn't use Front Panels?  Perhaps you're going about something the wrong way.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 3 of 11
(4,370 Views)

@jcarmody wrote:

Why do you need the Front Panel Menu bar for a VI running on an operating system that doesn't use Front Panels?  Perhaps you're going about something the wrong way.


Oops, good point. I read it as "run-time", so maybe that's what OP meant.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 4 of 11
(4,365 Views)

I wanted to obtain the reference in any other way, because I use the "Open VI Reference" and not pass the reference to the subVI. I simply wanted to know if there was any alternative to obtain the reference from the Real-Time menu. Thank.

0 Kudos
Message 5 of 11
(4,348 Views)

Nope. And you keep saying "real-time", but you mean "run-time", right?

 

Seems like something that should be possible though. Maybe submit a post to the LabVIEW Idea Exchange

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 6 of 11
(4,342 Views)
Sorry, Is Run-Time menu. Thank.
0 Kudos
Message 7 of 11
(4,332 Views)

I'm looking for the answer as well.  For regression testing (and I'm stuck on LabVIEW 7.1 due to progam baseline), I need to be able to remotely select a menu option.  So I need to find the MenuBar reference programatically.

0 Kudos
Message 8 of 11
(4,079 Views)

Well there is a private method on the VI for Invoke Built In Menu Item, but it also says Not Implemented in 2015, not sure if it actually works or not.  I also suggest Idea Exchange.

0 Kudos
Message 9 of 11
(4,067 Views)

Hi Dina,

 

when there is a run-time menu you should have a state machine or a queued message handler to process the menu selections of the user.

If this is the case and you still want to "remotely" select a menu option all you need to do is put another mesaage in your message handler (or call for  a certain state).

 

With the right VI architecture it is simple to include remote control options…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 11
(4,055 Views)