pmcwilliams Posted May 22, 2009 Share Posted May 22, 2009 I'm looking for a way to convert leader and text that is separate into a multileader where the text is attached to the leader. We just updated to new standards using the multileader and all the old stuff is not attached. I'm using AutoCad 2009. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
lpseifert Posted May 22, 2009 Share Posted May 22, 2009 maybe here... http://cadtips.cadalyst.com/multileaders/leader-multileader Quote Link to comment Share on other sites More sharing options...
pmcwilliams Posted May 22, 2009 Author Share Posted May 22, 2009 maybe here...http://cadtips.cadalyst.com/multileaders/leader-multileader That is exactly what I was looking for. You just made my life here so much easier! Thanks so much! Quote Link to comment Share on other sites More sharing options...
NBC Posted May 22, 2009 Share Posted May 22, 2009 Be aware when using that routine that the exact positioning of the Multi-Leader Text that replaces the QLeader Text may not be at the same point. Quote Link to comment Share on other sites More sharing options...
pmcwilliams Posted May 22, 2009 Author Share Posted May 22, 2009 Be aware when using that routine that the exact positioning of the Multi-Leader Text that replaces the QLeader Text may not be at the same point. Thanks for your concern but the text is actually attaching right where I need it to. (Or should I say where the company wants it to) I'm not sure I like where the text attaches (In the middle of the note) because to me it goes against all drafting practices that I was taught years ago. Quote Link to comment Share on other sites More sharing options...
Bigbongo Posted January 9, 2012 Share Posted January 9, 2012 Hi I am using 2012 and after selecting the leader + text is asking for location and then again for text. Quote Link to comment Share on other sites More sharing options...
Organic Posted January 10, 2012 Share Posted January 10, 2012 Hi I am using 2012 and after selecting the leader + text is asking for location and then again for text. It works. I wouldn't say its that accurate with regards to the justification as above though. Quote Link to comment Share on other sites More sharing options...
Bigbongo Posted January 10, 2012 Share Posted January 10, 2012 Hi "super member", can you be a little more explicit? Justification is not important now, however put together leader + text will be very useful to update old dwg. I am missing something??? I am selecting the old leader with no place for text, just the arrow and the text is a multitext entity. Please let me know TX Newbie member!!! Quote Link to comment Share on other sites More sharing options...
cooldude Posted August 29, 2017 Share Posted August 29, 2017 Hello all, this lisp works great but i would like to know if someone can do a slight modification. The reason i am using this lisp is because i have many drawings where the leaders have been exploded. So i would like to replace the text and exploded leaders with multileaders. I wont the new multileader to be in the same place as the old one so what i would like to do is pick the leaders to delete but not actually delete them until i can pick the points to where they are for the new leader. This way i don't lose the existing position of the existing leaders. I hope this make sense. Can anyone help me with this. The lisp is below. (defun c:am (/ newleader pt1 pt2 ss txt x w rjp-getbbwdth) (vl-load-com) (defun rjp-getbbwdth (obj / out ll ur) (vla-getboundingbox obj 'll 'ur) (setq out (mapcar 'vlax-safearray->list (list ll ur))) (distance (car out) (list (caadr out) (cadar out))) ) (if (setq ss (ssget '((0 . "*TEXT")))) (progn (setq txt (apply 'strcat (mapcar 'cdr (vl-sort (mapcar '(lambda (x) (cons (vlax-get x 'insertionpoint) (strcat (vlax-get x 'textstring) " ") ) ) (setq ss (mapcar 'vlax-ename->vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))) ) ) ) (function (lambda (y1 y2) ( ) ) ) ) w (car (vl-sort (mapcar 'rjp-getbbwdth ss) '>)) txt (apply 'strcat (mapcar 'chr (reverse (cdr (reverse (vl-string->list txt))))) ) ) (mapcar 'vla-delete ss) ) ) (if (and (setq pt1 (getpoint "\nSpecify leader arrowhead location: ")) (setq pt2 (getpoint pt1 "\nSpecify landing location: ")) ) (progn (command "._MLEADER" pt1 pt2 "") (setq newleader (vlax-ename->vla-object (entlast))) (vla-put-textstring newleader txt) (vla-put-textwidth newleader w) ) ) (princ) ) Quote Link to comment Share on other sites More sharing options...
SLW210 Posted August 30, 2017 Share Posted August 30, 2017 Please read the Code Posting Guidelines and edit your Code to be included in Code Tags.[NOPARSE] Your Code Here[/NOPARSE] = Your Code Here Quote Link to comment Share on other sites More sharing options...
cooldude Posted August 30, 2017 Share Posted August 30, 2017 My apologies. i did not know that. (defun c:am (/ newleader pt1 pt2 ss txt x w rjp-getbbwdth) (vl-load-com) (defun rjp-getbbwdth (obj / out ll ur) (vla-getboundingbox obj 'll 'ur) (setq out (mapcar 'vlax-safearray->list (list ll ur))) (distance (car out) (list (caadr out) (cadar out))) ) (if (setq ss (ssget '((0 . "*TEXT")))) (progn (setq txt (apply 'strcat (mapcar 'cdr (vl-sort (mapcar '(lambda (x) (cons (vlax-get x 'insertionpoint) (strcat (vlax-get x 'textstring) " ") ) ) (setq ss (mapcar 'vlax-ename->vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))) ) ) ) (function (lambda (y1 y2) (< (cadr (car y2)) (cadr (car y1)))) ) ) ) ) w (car (vl-sort (mapcar 'rjp-getbbwdth ss) '>)) txt (apply 'strcat (mapcar 'chr (reverse (cdr (reverse (vl-string->list txt))))) ) ) (mapcar 'vla-delete ss) ) ) (if (and (setq pt1 (getpoint "\nSpecify leader arrowhead location: ")) (setq pt2 (getpoint pt1 "\nSpecify landing location: ")) ) (progn (command "._MLEADER" pt1 pt2 "") (setq newleader (vlax-ename->vla-object (entlast))) (vla-put-textstring newleader txt) (vla-put-textwidth newleader w) ) ) (princ) ) Quote Link to comment Share on other sites More sharing options...
cooldude Posted August 30, 2017 Share Posted August 30, 2017 (defun c:am (/ newleader pt1 pt2 ss txt x w rjp-getbbwdth) (vl-load-com) (defun rjp-getbbwdth (obj / out ll ur) (vla-getboundingbox obj 'll 'ur) (setq out (mapcar 'vlax-safearray->list (list ll ur))) (distance (car out) (list (caadr out) (cadar out))) ) (if (setq ss (ssget '((0 . "*TEXT")))) (progn (setq txt (apply 'strcat (mapcar 'cdr (vl-sort (mapcar '(lambda (x) (cons (vlax-get x 'insertionpoint) (strcat (vlax-get x 'textstring) " ") ) ) (setq ss (mapcar 'vlax-ename->vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))) ) ) ) (function (lambda (y1 y2) (< (cadr (car y2)) (cadr (car y1)))) ) ) ) ) w (car (vl-sort (mapcar 'rjp-getbbwdth ss) '>)) txt (apply 'strcat (mapcar 'chr (reverse (cdr (reverse (vl-string->list txt))))) ) ) (mapcar 'vla-delete ss) ) ) (if (and (setq pt1 (getpoint "\nSpecify leader arrowhead location: ")) (setq pt2 (getpoint pt1 "\nSpecify landing location: ")) ) (progn (command "._MLEADER" pt1 pt2 "") (setq newleader (vlax-ename->vla-object (entlast))) (vla-put-textstring newleader txt) (vla-put-textwidth newleader w) ) ) (princ) ) 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.