vlax-3d-point function to build the required data structure. For example, the following call takes a list of points and converts the list into an array of three doubles:
Safearray data must be passed to ActiveX methods through variants. That is, you create a safearray, then you assign the safearray to a variant before passing it to a method. For methods that require you to pass a three-element array of doubles (typically to specify a point), you can use the_$ (setq circCenter (vlax-3d-point '(3.0 3.0 0.0)))
#<variant 8197 ...>
vlax-3d-point two or three numbers, instead of a list. For example:
You can also pass$ (setq circCenter (vlax-3d-point 3.0 3.0))
#<variant 8197 ...>
vlax-3d-point sets it to zero. You can use vlax-safearray->list to verify the contents of the variable set by vlax-3d-point:
When you omit the third point from your argument,$ (vlax-safearray->list (vlax-variant-value circcenter))
(3.0 3.0 0.0)
vlax-TMatrix function performs a similar task for transformation matrices, which are required by the vla-TransformBy function. It builds the transformation matrix from four lists of four numbers each, converting all numbers to reals, if necessary. For example:
The_$ (vlax-tmatrix '((1 1 1 0) (1 2 3 0) (2 3 4 5) (2 9 8 3)))
#<variant 8197 ...>
If you need to create a variant for an array containing anything other than three doubles or a transformation matrix, you must build it yourself.
To create a variant containing an array of four doubles
(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))
var4dubs variable now contains a variant containing an array of doubles.
The