Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

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.


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.


Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit