vlax-safearray->list (AutoLISP/ActiveX)

Returns the elements of a safearray in list form

Supported Platforms: Windows only

Signature

(vlax-safearray->list var)
var

Type: Safearray

A variable containing a safearray.

Return Values

Type: List or nil

A list containing the elements of the safearray.

Examples

Create a single-dimension array of doubles:

(setq point (vlax-make-safearray vlax-vbDouble '(0 . 2)))
#<safearray...>

Use vlax-safearray-put-element to populate the array:

(vlax-safearray-put-element point 0 100)
100

(vlax-safearray-put-element point 1 100)
100

(vlax-safearray-put-element point 2 0)
0

Convert the array to a list:

(setq pointlist (vlax-safearray->list point))
(100.0 100.0 0.0)

The following example demonstrates how a two-dimension array of strings is displayed by vlax-safearray->list:

(vlax-safearray->list matrix)
(("a" "b") ("c" "d"))