ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Flatten / Unflatten to String: Losing Variant Data (Example Provided)

This is a simple one (I hope). When I take a cluster (which has a variant array as an element), I loose the variant data in the flatten/unflatten process. The simple panel and diagram are below. Where did the variant data go?
0 Kudos
Message 1 of 4
(3,172 Views)

Seems to work fine for me in LV 7.0.

Can you upload an actual VI?


___________________
Try to take over the world!
0 Kudos
Message 2 of 4
(3,145 Views)
I think I may have found the issue. The problem VI is attached ("test1.vi"). The variants in this example are actually Database Variants. If I use the database type information to convert these variants to a normal variant, then the flatten to/from string works properly.
 
Please see the attached "DB Variant to FlatString.vi" that fixes the problem.  I'm learning all the time - just very slowly!
Download All
0 Kudos
Message 3 of 4
(3,129 Views)
Yes, OLE variants are a problem. See here for some more examples. I think this may have been resolved in LV 8.x, but I'm not sure.

___________________
Try to take over the world!
0 Kudos
Message 4 of 4
(3,118 Views)