LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I edit the case selector label

I had a case structure comprising 5 cases.  The Selector Label was descriptive text.  I added a 6th case.  Adding the case turned all the case selector labels to numbers.  How do I get the text labels back?
 
And why is there no topic found in Help for Selector Label"?
Why is there no topic found in Help for "Labeling tool"?
Jeff
Climbing the Labview learning curve!
Sanarus Medical
Pleasanton, CA
Message 1 of 10
(10,969 Views)

Hi Jeff,

I'll probably need more information to help you with this problem.  Usually it's the datatype that you have wired into the Case Structure that dictates what types of values (numeric, string, boolean, etc.) you see in the selector.  If you had strings in the selector, and you added a case, I can think of no reason why *all* of your cases would all of a sudden display numbers.  Could you perhaps attach a VI to your post that demonstrates the problem?

Good luck,

-D

0 Kudos
Message 2 of 10
(10,961 Views)
This has not been my experience.
 
Can you attach an example that demonstrates the problem? What is wired to the selector terminal (number, string, enum, etc.). What is your LabVIEW version? 
0 Kudos
Message 3 of 10
(10,962 Views)

I spent an hour with a very patient and helpful NI apps engineer.  Here's what I learned.

The original vi designer used enumerated list constants inside the cases to navigate among the cases.  The active enumerated list constant for the currently executing case is output to a shift register at the edge of the main while loop.  That enumerated list value is then used as the case selector for the next execution of the case structure.  All instances of the enumerated lists were identical, and the lists matched the case selector names.

I got into trouble by adding a new case.  When I edited the first of the many enumerated list constants to include the new case name, I created a situation in which the enumerated list were no longer identical.  Apparently that mismatch caused Labview to revert to numerical names for the cases.   Once the new case name was added to all the enumerated lists, Labview would let me use the desired names for the case selector labels.

I guess this doesn't qualify as a bug, but I sure wish the online help contained enough information for me to solve this without an apps engineer.

Jeff
Climbing the Labview learning curve!
Sanarus Medical
Pleasanton, CA
Message 4 of 10
(10,937 Views)
That is one drawback about using enums instead of strings for case selection.  The way to overcome this drawback is to make the enum into a custom control.  Click on the enum control to highlite it.  Then click on the Edit menu bar selection and select Customize Control from the drop down list.  Save the new control with a .ctl extension.  Use this control in all of your vi's that need it.  Delete the enum that is currently in all your vi's.  Then in each vi, from the front panel click on the Select a Control function palette, and navigate to the new control and select it.  Now anytime you need to add an item or make any change to the enum control, you can choose to apply the changes to all vi's that are currently open.  Opening any other vi that uses the control will automatically import the newly changed control.  Problem solved.
- tbob

Inventor of the WORM Global
Message 5 of 10
(10,934 Views)

tbob: that works if you convert the control to a TypeDef with auto update from TypeDef turned on in all of the places that it is used.  I have never been able to get that to work with just a control. You have to manually reload the control in each place that it is used (when you make a change like add a state).

So, open the control and then use the drop down menu at the top and select TypeDef. Save it and then change all locations that use the original to the TypeDef. Adding a case is then as easy as opening the TypeDef and adding to the list. - well okay - you still have to add the case to the case structure.

     Rob

Message 6 of 10
(10,928 Views)
Sorry, I forgot to mention that point.  Yes you do need to convert to a TypeDef.
- tbob

Inventor of the WORM Global
0 Kudos
Message 7 of 10
(10,922 Views)
this thread describes the problem im having, but i couldn't find customize control in the edit menu.  has it been moved or is there now another way to do this?
0 Kudos
Message 8 of 10
(10,437 Views)

acgraham wrote:
this thread describes the problem im having, but i couldn't find customize control in the edit menu.  has it been moved or is there now another way to do this?

 

Are you looking at the control from the front panel for Customize Control on the right click menu?
0 Kudos
Message 9 of 10
(10,433 Views)

Thanks!

0 Kudos
Message 10 of 10
(5,488 Views)