LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I determine the length of data in a cluster before it is written to a file

I am writing a primary cluster that contains other clusters that contain waveforms, numbers, strings, etc. multiple times to a single file. When I read this file I want to be able to know how long each primary cluster is so I can look at different primaries by inputting an offset on the read file vi. I can get the number from the offset output of the write vi, but of course it is too late to write that into the file. Is there any vi that will tell me the length of a complicated cluster before I write it to file? Or is there a whole other way to go about this problem thats easier? Any ideas would be greatly appreciated. Thanks!
0 Kudos
Message 1 of 2
(2,575 Views)
You can write things whereever you want in a file so you could insert the length afterwards...

You could also flatten the cluster and get the size of the flattened data.
Message 2 of 2
(2,575 Views)