LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Add Case For Every Value" option does not exist when I right Click a case structure.

Has anyone else seen this problem? I am running LV 2009. Wiring a Ring or Enumerated to a new case structure does not automatically create matching cases and the "Add Case for Every Value" option does not exist in the pull down menu when the case structure is right clicked. Could this be a bug?
0 Kudos
Message 1 of 8
(7,216 Views)
Wiring a ring is not supposed to create matching values to the strings and it is not supposed to have the option 'Add Case for Every Value'. An enum does have this option and it works for me in 2009. If it's not for you, post a VI that reproduces the behavior.
Message 2 of 8
(7,208 Views)

Dennis Knutson wrote:
Wiring a ring is not supposed to create matching values to the strings and it is not supposed to have the option 'Add Case for Every Value'. An enum does have this option and it works for me in 2009. If it's not for you, post a VI that reproduces the behavior.

Adding to Dennis (Knight of the Lightning Fingers)...

 

Check all of the source tht feed the selector to enusre you don't have two different enums or a ring in the mix anywhere.

 

Anther quick check is to show the help window (ctrl-h) and use the wire tool to float over the wires to ensure the wire is actually an enum.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 8
(7,205 Views)

Dennis Knutson wrote:
Wiring a ring is not supposed to create matching values to the strings and it is not supposed to have the option 'Add Case for Every Value'.

To respond to the eventual question of "why not?" that may be asked: Good thing, too, since with the default data type of U16 for a ring that would be a whole lotta (65,535) cases that would be "conveniently" automatically added. 

Message 4 of 8
(7,188 Views)

I have had this problem while working the Simple State Machine - Traffic Light. 

When you open type def. be sure to right click the enum you are saving and "edit items..." This is where you can "Insert" the cases you want. Every word case will line up with a number ex:0,1,2,3,etc. Once you add all the cases, save the enum and close it, then the case structure should have the option to "Add Case For Every Value."

 

If the case structure does not have the option, you will still be able to add case before/after and type in the case you want without it showing up red. 

 

I hope this helps!

Message 5 of 8
(5,661 Views)

@johnsonhp wrote:

I have had this problem while working the Simple State Machine - Traffic Light. 

When you open type def. be sure to right click the enum you are saving and "edit items..." This is where you can "Insert" the cases you want. Every word case will line up with a number ex:0,1,2,3,etc. Once you add all the cases, save the enum and close it, then the case structure should have the option to "Add Case For Every Value."

 

If the case structure does not have the option, you will still be able to add case before/after and type in the case you want without it showing up red. 

 

I hope this helps!


Sounds like you either do not have a type def or have one or more constant wired that is NOT the correct type def.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 8
(5,647 Views)

I am so glad we are still trying to solve this problem after 8 years!!!


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 8
(5,640 Views)

I think my record was responding to a post that was about ten years old.  Yikes.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 8
(5,618 Views)