Lee Mac Posted April 5, 2009 Share Posted April 5, 2009 I am trying to use "vla-addleader", but keep receiving an error: BAD ARGUMENT TYPE: VLA-OBJECT # I am using the following code: (vla-addleader spc VertVar (vla-addMText (vlax-3d-Point (polar pt2 0 (/ (getvar "TEXTSIZE") 2.0))) (- (caadr tBox) (caar tBox)) tStr) acLineWithArrow) Where, spc is the space retrieved, VertVar is a variant, like this: (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 "(- (caadr tBox) (caar tBox))" is a number (real) and tStr is just a string. I can't work out what is going wrong Thanks for your time Lee EDIT: Just seen I missed a "spc" from the MTEXT expression Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.