To Variant Function

LabVIEW 2018 Help

Edition Date: March 2018
Part Number: 371361R-01
View Product Info

DOWNLOAD (Windows Only)

LabVIEW 2016 Help
LabVIEW 2017 Help
LabVIEW 2018 Help
LabVIEW 2019 Help
LabVIEW 2020 Help

Owning Palette: Variant VIs and 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.


Not Helpful