Registered forum members do not see this ad.
I am trying to use "vla-addleader", but keep receiving an error:
I am using the following code:BAD ARGUMENT TYPE: VLA-OBJECT #<VARIANT 8197 ...>
Where, spc is the space retrieved, VertVar is a variant, like this:Code:(vla-addleader spc VertVar (vla-addMText (vlax-3d-Point (polar pt2 0 (/ (getvar "TEXTSIZE") 2.0))) (- (caadr tBox) (caar tBox)) tStr) acLineWithArrow)
and "(- (caadr tBox) (caar tBox))" is a number (real)Code:(setq Verts (apply 'append (list pt1 pt2)) VertVar (vlax-make-variant (vlax-safearray-fill (vlax-make-safearray vlax-vbdouble (cons 0 (1- (length Verts)))) Verts)))
and tStr is just a string.
I can't work out what is going wrong
Thanks for your time
EDIT: Just seen I missed a "spc" from the MTEXT expression