Get Menu Selection Function

FlexRIO Help

Edition Date: November 2015

Part Number: 372614J-01

»View Product Info

»Download the Help in ZIP Format

Owning Palette: Menu Functions

Requires: Base Development System

Returns the item tag of the last selected menu item, optionally waiting ms timeout milliseconds.

If you use this function with an Event structure configured to handle the same menu item, the Event structure takes precedence and LabVIEW ignores the Get Menu Selection function. In any given VI, use the Event structure or the Get Menu Selection function.

(Real-Time Module) You cannot use this function in VIs that run on RT targets.


menu reference is the reference to a menu bar in a VI. You can obtain this refnum with the Current VI's Menubar function.
ms timeout is the maximum amount of time this function checks for a menu selection. The default is 200 ms. –1 indicates never to time out.
If block menu is TRUE, LabVIEW disables menu tracking after reading an item tag. After you process the menu selection, you must use the Enable Menu Tracking function to enable menu tracking. The default is FALSE.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
If timed out is TRUE, a user selection was not made within the time specified by ms timeout.
menu reference out returns menu reference unchanged.
item tag is the menu item that was selected. Wire this value to a Case structure selector terminal to handle the menu selection. When you create a case to handle each menu item, enter application item tags in the case selector label to handle application menu items.
item path describes the position of the item in the menu hierarchy, which is in the format of a list of menu tags separated by a colon (:). For example, if you choose the Open menu item from the File menu, the item path is File:Open.
error out contains error information. This output provides standard error out functionality.


Refer to the Customizing the Menubar VI in the labview\examples\Dialog and User Interface\Menu\Customizing the Menubar directory for an example of using the Get Menu Selection function.


Not Helpful