vlax-safearray-type

AutoCad AutoLISP Functions

 
vlax-safearray-type
 
 
 

Returns the data type of a safearray

(vlax-safearray-type var)

Arguments

var

A variable containing a safearray.

Return Values

If var contains a safearray, one of the following integers is returned:

2 Integer (vlax-vbInteger)

3 Long integer (vlax-vbLong)

4 Single-precision floating-point number (vlax-vbSingle)

5 Double-precision floating-point number (vlax-vbDouble)

8 String (vlax-vbString)

9 Object (vlax-vbObject)

11 Boolean (vlax-vbBoolean)

12 Variant (vlax-vbVariant)

If var does not contain a safearray, an error results.

Examples

Create a single-dimension array of doubles and a two-dimension array of strings:

_$ (setq point (vlax-make-safearray
vlax-vbDouble '(0 . 2)))
#<safearray...>
_$ (setq matrix (vlax-make-safearray
vlax-vbString '(1 . 2) '(1 . 2) ))
#<safearray...>

Use vlax-safearray-type to verify the data type of the safearrays:

_$ (vlax-safearray-type point)
5
_$ (vlax-safearray-type matrix)
8
See Also