To Variant Function

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Owning Palette: Variant Functions

Requires: Base Development System

Converts any LabVIEW data to variant data. You also can use this function to convert ActiveX data to variant data.

Details  

anything is any LabVIEW data you want to convert. This parameter is polymorphic.
variant is the resulting variant data.

To Variant Details

If you use the To Variant and Variant to Data functions with LabVIEW classes consider the following caveat.

Variants do not recognize inheritance hierarchies. For example, if you have child data traveling on a parent class wire and you then wire the parent wire to a To Variant function, the variant recognizes only the parent data type. If you wire a child data type to the Variant to Data function to extract the child data, LabVIEW returns an error. You must wire the parent to the Variant to Data function. Then use the To More Specific function to retrieve the child class data.

WAS THIS ARTICLE HELPFUL?

Not Helpful