Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Variant To / From Element

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

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. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.
status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.
code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning.

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 datatype 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.


Resources


 

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