LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

converting enum into varient

I undestant output of enum is index value I expect that index i am changing to varient and back to integer value. Is there any thing wrong in my concept.

0 Kudos
Message 11 of 14
(628 Views)

I think the problem here is that we don't know what you are trying to ultimately accomplish, as you haven't really explained this. For the example you posted, as crossrulz mentioned, all you need is an I32 conversion bullet - there is no reason for a variant. You mention you have 200 additional cases. 200 additional cases of what? We are just guessing around the problem here, and it's difficult for us to help you unless you provide a better explanation of the overall objective.

0 Kudos
Message 12 of 14
(614 Views)

@smercurio_fc wrote:

I think the problem here is that we don't know what you are trying to ultimately accomplish, as you haven't really explained this. For the example you posted, as crossrulz mentioned, all you need is an I32 conversion bullet - there is no reason for a variant. You mention you have 200 additional cases. 200 additional cases of what? We are just guessing around the problem here, and it's difficult for us to help you unless you provide a better explanation of the overall objective.


200 cases would be a NIGHTMARE. This sounds like a one-vi-does-everything approach which I promise, is not a good way to do things. If possible, break the code up, keeping similar cases confined to the same VIs, but don't cram it all in one.

0 Kudos
Message 13 of 14
(606 Views)

This possibly could be a case for a polymorphic VI.


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 14 of 14
(588 Views)