Community
Hi,
I need Visual Lisp code for the leader i have attached.
Something like this perhaps.
Untested, I don't have AutoCAD in this laptop...
(defun c:test ( / ACTLYT LEAOB MTXTOB PT1 PT2 PT3 PTLST PTS PTSVAR) (vl-load-com) (if (and (setq pt1 (getpoint "\nPick the first point: ")) (setq pt2 (getpoint pt1 "\nPick the second point: ")) (setq pt3 (getpoint pt2 "\nPick the third point: ")) );; and (progn (setq actlyt (vla-get-block (vla-get-activelayout (vla-get-activedocument (vlax-get-acad-object)))) mtxtob (vla-addmtext actlyt (vlax-3d-point pt3) 1 "") ptlst (apply 'append (list pt1 pt2 pt3)) pts (vlax-make-safearray vlax-vbDouble '(0 . 8)) );; setq (vlax-safearray-fill pts ptlst) (setq ptsvar (vlax-make-variant pts)) (setq leaob (vla-addleader actlyt ptsvar mtxtob acLineWithArrow)) (vla-put-dimensionlinecolor leaob 1) (vla-put-arrowheadsize leaob 0.88) (vla-put-textgap leaob 0.0) (vla-put-verticaltextposition leaob 0) (vla-put-layer leaob "N-E-TEXT") (vla-delete mtxtob) );; progn );; if (princ) );; test
HTH
Henrique