Lee Mac 发表于 2022-7-6 14:50:01

Troubles with vla-addleader...

I am trying to use "vla-addleader", but keep receiving an error:
 
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
页: [1]
查看完整版本: Troubles with vla-addleader...