07-08-2009 01:23 PM
I think I already know the answer to this, but I'm going to ask anyway. In the attached image, is it possible to programmatically change the range of numbers the case uses?
Tay
Solved! Go to Solution.
07-08-2009 01:29 PM
There is probably some method using scripting to be able to do this. But even if it is available, is it worth the trouble?
Why do want to this?
I would suggest turning each case into a particular enum value. Then use other code ahead of it to convert your value to the particular enum value based on comparison conditions which would be much easier to change programmatically.
07-08-2009 01:37 PM
07-08-2009 01:37 PM
Well, I had this code in place and then the requirement came down to be able to easily change the range of values each case handles without recoding. I was idly wondering if there was some easy magic trick I didn't know about to change the range of numbers each case handles. I guess not. So I'll rewrite it.
Thanks.
Tay
07-08-2009 02:06 PM
DFGray,
I have the Scripting unit installed. I can't seem to find the Property of a case selector. I right-click on the case and there are no properties to set. If I drop a property node on the vi, a random search doesn't show the framenames property.
Tay
07-08-2009 02:11 PM
I would probably solve the problem programmatically, e.g. as follows.
Start with Ravens idea above, and use an array of range boundaries, e.g. as described here.
07-09-2009 07:40 AM
To use a property node on a case selector, you need to have a reference to it. There are several ways to open the reference, depending on where the object you want to reference is located.