Johan,
It is interesting, but I just ran into what I think is a similar problem to yours, sort of...
I need to get ANY data from a cluster, and convert it to a string to write to a file. My program has no idea what the data is. It could be a string, a numeric, an array, whatever. Strings were of course no problem. Converting booleans was a little tricky, as was numerics. But now I have come across an array. The Variant returns something resembling the dimensions of the array. What I am planning to do is act upon this (I get a variant that contains "[nXn]" in it, so I can tell when it is an array) information to put the code into a mode where it can get the array data and then write it to a string.
This is going to be very difficult. What I wil
l more than likely do is just grab a reference to the array, and retrieve the value. Then, I can figure out the dimensions, and write the array as a single string, separated by commas, with the dimensions of the array at the start of the string.
As it has been suggested, this is probably how you should be going as well. The only way you can get to an element of an array is to get the array itself. Arrays in LabVIEW are stored as pointers, so trying to retrieve an element of an array through references seems impossible. Just grab the value of the reference "value" of the array, and index the array from there. I think your task is a lot easier than mine.
Also, if you go to LabVIEW help (not context help of course) from the "Variant to Data" function, you will see a link to an application note on Data Storage in LabVIEW that was included with your documentation. Read this document! It is extremely useful for what you are trying to do.