LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Enum based case structure

I am having a case structure whose case selector is connected to a enum having some 30 elements. One of the case has more than 8-9 elements and so it is displayed as, Test_1, Test_67, Test89..Test_21 How can I view all the in between values that are are assigned to that particular case, i.e. between Test89 and Test_21.
0 Kudos
Message 1 of 7
(2,547 Views)

Post your code rather than talk. That would be easy to help you. It does not make any sense to me. You have 30 cases and I did not understand remaining.

0 Kudos
Message 2 of 7
(2,538 Views)

You need to go into your Emun definition to see all the values between Test89 and Test_21.

 

0 Kudos
Message 3 of 7
(2,523 Views)
Hi dkfire, In Enum ofcourse I can view the elements but when I want to edit my case structure then how to do that. For Ex: In the enum, between Test 89 and 21 there's a case namely 'Test73' which I want to move to another case. But since, I am not able to view that element in the case structure, it becomes difficult to move any of the cases between the range test 89 and 21!
0 Kudos
Message 4 of 7
(2,493 Views)

I Usually create a constant from the connecting Enum to see which options are available. You'll need to change the Test89..Test_21 to Test89..Test73,Test75..Test_21 so that Test74 can be place in another case.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 7
(2,474 Views)

Please post the entire items in your enum, or a screenshot.

 


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 6 of 7
(2,465 Views)

Might I suggest you avoid this approach all together. It appears that there is no logic to how you define your ENUMs and by using ranges you are only inviting a bug in the future for the very reasons you are asking the current question. I would suggest that you either explicitly assign each selection to a case or make sure that your ENUM is sorted. Since your names do have a number this should be very easy to do.

 

If you are creating some type of state machine using this ENUM instead of naming your ENUMs with an arbitrary name such as Test_83, why not use meaningful names such as Test_Maximum_Voltage. I think your code would be more readable in the end.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 7 of 7
(2,446 Views)