If you have existing MTEXT objects and would like to add a leader to it and make into a Multileader object, this LISP will be your friend. The text objects do need to be MTEXT objects for this routine to work correctly. So you may need to use the TXT2MTXT command (express tools).
- MT2ML <enter> to start
- Select the MTEXT object that you’d like to add a leader to.
- Specify where the arrow portion of the leader should go.
- Specify the first vertex of the leader.
Once you have the leader set – hit <enter> to complete.
(defun c:mt2ml ( / oobj nobj nstrg) (vl-load-com) (setq oobj (vlax-ename->vla-object (car (nentsel "\nSelect source text: ")))) (if (= (vlax-get-property oobj 'ObjectName) "AcDbMText") (setq nstrg (vlax-get-property oobj 'TextString)) (exit) ) (command "_MLEADER") (while (= 1 (logand (getvar "CMDACTIVE") 1)) (command PAUSE)) (setq nobj (vlax-ename->vla-object (entlast))) (if (= (vlax-get-property nobj 'ObjectName) "AcDbMLeader") (vlax-put-property nobj 'TextString nstrg) (exit) ) (entdel (vlax-vla-object->ename oobj)) (princ) )