vlax-variant-value (AutoLISP/ActiveX)

Returns the value of a variant

Supported Platforms: Windows only

Signature

(vlax-variant-value var)
var

Type: Variant

A variable containing a variant.

Return Values

Type: Integer, Real, String, VLA-object, Safearray, T, or nil

The value of the variable. If the variable does not contain a variant, an error occurs.

Examples

(vlax-variant-value varstr)
"ghost"

(vlax-variant-value varint)
5

(vlax-variant-value notvar)
; *** ERROR: bad argument type: variantp 6.0

The last example results in an error, because notvar does not contain a variant.