LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use of run-time menu

Solved!
Go to solution

Hello,

 

I trying to use run-time menu and i managed to pragram and it works well but i'm not sure that i've done it according to accepted standards of Labview.

Particularly , I'm not satisfied with the use of the array of strings and the case structure of seven case.

 

Thanks for your help

PS : I can't send an rtm file.

Download All
0 Kudos
Message 1 of 3
(709 Views)
Solution
Accepted by topic author Djamel_LFC

You are correct, you can get rid of all that string array, for loop,  and compare code.  Wire the string from the RTE (run time menu) item tag directly into the selector input of the case structure.  That will change it from a True/False boolean case title to a string with the value in "quotes".  Now you can rename each case to match exactly your menu items, and add any cases as needed so that all your menu items are covered.  (By the way, with a string input case selection, you will need to have one case as the default case.   Set it by right clicking on the case title.)   Then you can put whatever code you need to execute in each case state.  Example, open file code right there in the open case.

0 Kudos
Message 2 of 3
(685 Views)

Hello AMP12,

 

Thanks a lot for your answer. It works well and simplifies my VI.

 

Djamel

0 Kudos
Message 3 of 3
(668 Views)