That code seems to work fine Tim, Thanks
Here's another option that seems to work ..
(defun listToVariantArray (lst varType)
;; Frank Oquendo acadx.dwg
;;
(vlax-make-variant
(vlax-safearray-fill
(vlax-make-safearray varType (cons 0 (1- (length lst))))
(mapcar '(lambda (x)
(cond ((= (type x) 'list)
(vlax-safearray-fill
(vlax-make-safearray
(if (apply '= (mapcar 'type x))
(cond ((= (type (car x)) 'REAL) vlax-vbdouble)
((= (type (car x)) 'INT) vlax-vbinteger)
((= (type (car x)) 'STR) vlax-vbstring)
)
vlax-vbvariant
)
(cons 0 (1- (length x)))
)
x
)
)
((= (type x) 'ename)
(vla-get-objectid (vlax-ename->vla-object x))
)
(t x)
)
)
lst
)
)
)
)
(defun lisp-value (v)
;; the Holy Grail of vla->lisp conversion? ;-)
;; Copyright 2002 Vladimir Nesterovsky.
;; Free for use by any commercial entity with
;; less then $100 million annual revenue.
(cond ((= (type v) 'variant) (lisp-value (variant-value v)))
((= (type v) 'safearray) (mapcar 'lisp-value (safearray-value v)))
(t v)
)
)
(setq templist
(list
(list
"testone"
"one"
)
(list
"testtwo"
"two"
)
(list
"testthree"
"three"
)
)
)
Run Tim's code then :
(lisp-value tempVariant) ;->>
(("testone" "one") ("testtwo" "two") ("testthree" "three"))
(setq test2 (listToVariantArray templist vlax-vbVariant )) ;->>
#<variant 8204 ...>
(lisp-value test2) ;->>
(("testone" "one") ("testtwo" "two") ("testthree" "three"))
;;--------
I'll try to feed it to the ActiveX beast later today.