08-03-2016 05:19 AM
Hi,
I have a cluster stucture which holds different types of data, one type is an array of clusters. the clusters in this array will be accessed at different points in my program and wither written to or read. I'm think of using variant attributes to track the index of each cluster in the array. However the clusters will be saves to an ini file and so my quation is will the attributes be save in the ini file aswell. I don't want to invest a lot of time into this if not as its essential it does.
Thanks
08-03-2016 05:22 AM
Hi Stephen,
how are "variant attributes" related to your "cluster containing an array of clusters"?
Why should variant attributes be saved in a file when you save "the clusters" to that file?
Mind to attach a VI to explain your problem?
08-03-2016 05:31 AM
Hi GerdW,
The variant attributes would be the file name or file path within a cluster of each element of the array.
The variant attributes needs to be saved as I need to read back in the ini file to get at the elements in the cluster. My program will have two modes a read and write. the read will use n ini file to read in information related to a data set and the write will be a mode where I generate the ini file and the values of its elements.
I haven't yet got much code as I haven't started to implement it, I've been trying to make sure that the method would work as it will take a considerable amount of time.
The following thread was where I initially found out about the variant attribute method. that may help you understand what by issue is.
http://forums.ni.com/t5/LabVIEW/Ordering-the-storage-of-file-data-into-an-array/m-p/3330232#M976792
Thank you
08-03-2016 05:45 AM
Stephen,
Although I haven't tested the idea, I would seriously doubt that the variant attributes would be saved to .ini files. The .ini format is fairly basic, and I doubt it even supports variant datatypes (although, again, I've not tested this). It wouldn't take long to test the theory by creating a variant, assigning an attribute, and saving it to an ini file. Check out the ini file to see what got saved.
Perhaps XML?