Creates a safearray
(vlax-make-safearray type '(l-bound . u-bound) ['(l-bound . u-bound)...)]
A maximum of 16 dimensions can be defined for an array. The elements in the array are initialized as follows:
0
Zero-length string.
:vlax-false
nil
Uninitialized (vlax-vbEmpty)
Arguments
The type of safearray. Specify one of the following constants:
vlax-vbInteger (2) Integer
vlax-vbLong (3) Long integer
vlax-vbSingle (4) Single-precision floating-point number
vlax-vbDouble (5) Double-precision floating-point number
vlax-vbString (8) String
vlax-vbObject (9) Object
vlax-vbBoolean (11) Boolean
vlax-vbVariant (12) Variant
The integer shown in parentheses indicates the value to which the constant evaluates. It is recommended that you specify the constant in your argument, not the integer value, in case the value changes in later releases of AutoCAD.
Lower and upper index boundaries of a dimension.
Return Values
The safearray created.
Examples
Create a single-dimension safearray consisting of doubles, beginning with index 0:
_$ (setq point (vlax-make-safearray vlax-vbDouble '(0 . 3)))
#<safearray...>
vlax-safearray->list function to display the contents of the safearray as a list:
Use the_$ (vlax-safearray->list point)
(0.0 0.0 0.0 0.0)
The result shows each element of the array was initialized to zero.
Create a two-dimension array of strings, with each dimension starting at index 1:
_$ (setq matrix (vlax-make-safearray vlax-vbString '(1 . 2) '(1 . 2) ))
#<safearray...>
vlax-make-variant, vlax-safearray-fill, vlax-safearray-get-dim, vlax-safearray-get-element, vlax-safearray-get-l-bound, vlax-safearray-get-u-bound, vlax-safearray-put-element, vlax-safearray-type, vlax-safearray->list, and vlax-variant-value functions. For more information on using these functions, see Working with Safearrays in the AutoLISP Developer's Guide.
The