02-24-2010 02:57 PM
Hi all,
Is it possible to generate an array of cluster with the following characteristic?
1. each element cluster in the array will be of different type
2. depending on the code, each element could be a different data type at different time. For example, the cluster at array[0] will be a string when the user input is one, and array[0] will be a U16 if the user input is two. The index for a particular datatype is arbitary.
Let me know. I am trying to write a subvi that will get an array of U16 convert the array to an array of cluster with string, U16, double, single, U32, etc.
Yik
Solved! Go to Solution.
02-24-2010 03:01 PM
Yes. Use an array of variants.
You use the To variant to turn your data type into a variant to store in the array. You use Variant to Data to convert the variant back to the original datatype, you just need to specify the datatype.
02-24-2010 03:20 PM
That would work great. Thanks!
Yik