09-19-2013 03:31 PM
Based on another function I would like to add elemets to an enum control automatically.
So for example one time the elements might be 1,2,3,6 another time 1,3,5,6,7
I would greatly appreciate your help on this
Thanks
09-19-2013 03:37 PM
You can only modify an enum in edit mode. You could create two different enums and show one or the other according to state.
09-19-2013 04:11 PM
You might want to use a Ring instead of an Enum if you need to change the items in the menu at runtime. You could have multiple enumerations. At run-time, pick the appropriate one, get the list of all the items in it (the GetNumericInfo function in the VariantDataType library will do it, under vi.lib\Utility\VariantDataType) and then write that list to the Strings[] property of a Ring.
09-19-2013 07:50 PM
Hi nathand, could you please give me a sample code so I can completely understand how to do it
Thanks
09-19-2013 10:16 PM
Sometinhg like this.
Thanks
09-20-2013 01:48 AM - edited 09-20-2013 01:52 AM
@Ranjeet_Singh wrote:
Sometinhg like this.
Why so complicated? Why the sequence? Why convoluted string operations? Why so many property node reads and writes?
Here's about the same...
09-20-2013 02:46 AM
I did sequence because if he wants to verify with multiple times then older data shouldn't be there..
This is better than that one ofcourse..Thank you sir.
09-20-2013 03:12 AM
@Ranjeet_Singh wrote:
I did sequence because if he wants to verify with multiple times then older data shouldn't be there..
Well, writing an empty array to the property node is useless, because it will get overwritten with the final array a nanosecond later. Too fast to see! So why do it?
09-20-2013 12:17 PM
What I was thinking was this:
09-20-2013 09:49 PM
Got the point