LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

image typedef changes in 2009

I have some LV 7.1.1 with the 7.1.1 Vision Module code where I used Flatten to XML and Unflatten From XML, to save/restore an image reference.  This code does not work with the 2009 versions, with the flatten to XML basically yielding a null value for the reference.  What's the best workaround for it and what really changed?  The "image" reference looks exactly the same.
0 Kudos
Message 1 of 5
(2,751 Views)

The best workaround is - do not use Flatten / Unflatten to XML with image reference. Internal representation of this reference may changed from version to version (was also changed from version 6 to version 7). Use IMAQ Flatten Image to string, then put this string to XML if you need this.

 

Andrey.

 

0 Kudos
Message 2 of 5
(2,746 Views)

I don't really care if the internal representation changed from version to version, as I'm not mixing and matching VIs from different versions of LabVIEW.  Within the same version the flatten/unflatten should be consistent and work, or it did in 7.1.1

 

I'm also not flattening the image but the image reference, thus IMAQ Flatten Image is not appropriate here.

 

 

0 Kudos
Message 3 of 5
(2,732 Views)
I'm not sure why it happened, but maybe you could coerce the image ref to/from a string before flattening to XML?
0 Kudos
Message 4 of 5
(2,718 Views)

I worked around it by using variant to flattened string, then flattening to xml the type string, passed that along with the data string along, then reversing the process on the other side.  It is still interesting why it broke, and not I have to go hunt all my other instances of flatten/unflatten to xml to see if they broke too, but I expect that all other uses are with more basic types or arrays/clusters of the same.

 

0 Kudos
Message 5 of 5
(2,714 Views)