Safearrays are used in combination with ActiveX objects to represent points and matrixes.
Note: ActiveX support in AutoLISP is limited to Windows only.
- At the AutoCAD Command prompt, allocate the space for an array using vlax-make-safearray and save the results to a variable with setq.
- At the prompt, assign the values to the array using vlax-safearray-fill.
- At the prompt, create a variant using vlax-make-variant and assign it the array.
Example
- At the AutoCAD Command prompt, enter the following
(setq 4dubs (vlax-make-safearray vlax-vbDouble '(0 . 3))) (vlax-safearray-fill 4dubs '(3.0 6.0 7.2 1.0)) (setq var4dubs (vlax-make-variant 4dubs))