Example Code

Event Structure Menu Selections with Disabled Items Using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

The example program here shows how to gray out certain values in subsequent enums based on the users selection in the the frist enum.


Description
Many times we want to make secondary menu selections based on previous menu selections. In order to do this the DisabledItems property node is used.

 
Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  • Run the program
  • Make a selection in the First Selection menu
  • Click the down arrow on the Subsequent Choice and see that certain selections are grayed out
  • Change the First Selection and see that the grayed out choices vary based upon this selection
  • Stop the program and investigate the block diagram, which is commented to describe the implementation logic.

 

Additional Information or References
VI Snippet

3-385.png

**This document has been updated to meet the current required format for the NI Code Exchange.**

Sam S
Applications Engineer
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.