05-25-2006 11:09 AM
05-25-2006 11:14 AM
Since you are trying to read and write Clusters to and from disk I would highly recommend using the Flatten to XLM functions. Makes it easy to read and write clusters to and from disk.
Matt
05-26-2006 01:51 AM
05-26-2006 07:28 AM
This should be what you are looking for. What I did was flatten to string before writing the file to disk. Wen reading I used unflatten from string. Should work for any case.
Matt
05-26-2006 08:39 AM
04-15-2010 01:06 PM
I don't know if you solved your problem or not, but I came up with a solution. The key is to use "Flatten to string" and "Unflatten from string". Don't use the XML functions. They seem to get all borked up when you try to read them back into a variant.
What I have attached is a project with two VIs. The WriteCompressedData takes in a variant, flattens it, and compresses the flattened string with the zlib DLL. The ReadCompressedData reads the file, inflates it, and then unflattens it back into a variant. Then you can cast the variant into whatever type you need. I also have a little GenerateWaveform VI that serves as an example by generating a waveform, writing it to disk and then reading the file back and displaying the waveform that was saved in the file.
These files were saved in LV 8.2.1.
04-15-2010 01:24 PM
Brian, you replied to a post made in 2006. I sure hope the originator found a solution by now.