Adds an element to an array
(vlax-safearray-put-element var index... value)
Arguments
A variable whose data type is a safearray.
A set of index values pointing to the element you are assigning a value to. For a single-dimension array, specify one index value; for a two-dimension array, specify two index values, and so on.
The value to assign the safearray element.
Return Values
The value assigned to the element.
Examples
Create a single-dimension array consisting of doubles:
_$ (setq point (vlax-make-safearray vlax-vbDouble '(0 . 2)))
#<safearray...>
vlax-safearray-put-element to populate the array:
Use_$ (vlax-safearray-put-element point 0 100)
100
_$ (vlax-safearray-put-element point 1 100)
100
_$ (vlax-safearray-put-element point 2 0)
0
Create a two-dimension array consisting of strings:
_$ (setq matrix (vlax-make-safearray vlax-vbString '(1 . 2) '(1 . 2) ))
#<safearray...>
vlax-safearray-put-element to populate the array:
Use_$ (vlax-safearray-put-element matrix 1 1 "a")
"a"
_$ (vlax-safearray-put-element matrix 1 2 "b")
"b"
_$ (vlax-safearray-put-element matrix 2 1 "c")
"c"
_$ (vlax-safearray-put-element matrix 2 2 "d")
"d"
vlax-safearray-fill function. The following function call accomplishes the same task as three vlax-safearray-put-element calls:
Note that you can also populate arrays using the(vlax-safearray-fill matrix '(("a" "b") ("c" "d")))
vlax-safearray-get-element, vlax-safearray-fill, and vlax-safearray-type functions.
The