Variant To / From Element Border Node

LabVIEW 2018 Help


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

DOWNLOAD (Windows Only)


LabVIEW 2015 Help
LabVIEW 2016 Help
LabVIEW 2017 Help
LabVIEW 2018 Help
LabVIEW 2019 Help

Owning Palette: Structures

Requires: Base Development System

Right-click the border of an In Place Element structure and select the Add Variant To / From Element option from the shortcut menu to place this border node on the In Place Element structure.

Details  

variant is the variant data you want to convert to the LabVIEW data type specified in type.
type is the LabVIEW data type to which you want to convert the variant data. type can be any data type. However, this function returns an error if LabVIEW cannot convert the data wired to variant to the data type you wire to this input. If the data is integers, you can coerce the data to another numeric representation, such as an extended-precision, floating-point number.
variant is the resulting variant data.
error out contains error information. This output provides standard error out functionality.

Variant To / From Element Details

Use this border node to perform operations on one or more variant data elements and replace the variant data with the new data type in the same location in memory. Each variant data element you retrieve with the border node on the left side of the structure must be converted back to a variant with the border node on the right side of the structure. This border node allows the LabVIEW compiler to avoid storing a complete value copy of the variant and variant data elements in memory.

The border node on the left side of the structure is similar to the Variant to Data function. The border node on the right side of the structure is similar to the To Variant function.

You can acquire the error output of the Variant To / From Element border node by wiring the error out terminal of the border node on either side of the structure. It is not necessary to wire the error out terminals of the border nodes on both sides of the structure because they have the same error output.

WAS THIS ARTICLE HELPFUL?

Not Helpful