Get Menu Selection Function
- Updated2025-07-30
- 3 minute(s) read
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.

Inputs/Outputs
menu reference
—
ms timeout (200)
—
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.
block menu (F)
—
error in (no error)
—
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
timed out
—
If timed out is TRUE, a user selection was not made within the time specified by ms timeout.
menu reference out
—
item tag
—
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
—
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
—
error out contains error information. This output provides standard error out functionality. |
Examples
Refer to the following example files included with LabVIEW.
- labview\examples\Dialog and User Interface\Menu\Customizing the Menubar\Customizing the Menubar.vi
menu reference
—
ms timeout (200)
—
block menu (F)
—
error in (no error)
—
timed out
—
menu reference out
—
item tag
—
error out
—