PDA

View Full Version : Dim style leader line



cadmando2
20th Oct 2010, 07:17 pm
Hey all.
One of my co-workers asked me if I knew a way to have a toolbar with 2 different leader lines to select, One leader line with arrow head and the other leader line with a loop on it.
She told me it was a pain each time just to change the the arrow head to loop.
She wanted a toolbar to select from to select leader line with arrow head or loop.
:D
dose anyone know of a lisp routine or would it be just as easy as writing a script file?

BlackBox
20th Oct 2010, 07:27 pm
You mean something like this:



(defun c:ARROW (/ ss)
(vl-load-com)
(if (setq ss (ssget '((0 . "LEADER"))))
((lambda (i / e v)
(while (setq e (ssname ss (setq i (1+ i))))
(if (= 0 (vla-get-arrowheadtype (setq v (vlax-ename->vla-object e))))
(vla-put-arrowheadtype v 7)
(vla-put-arrowheadtype v 0))))
-1))
(princ))



Edit:
This will handle multiple selections, and will toggle back and forth between "Default" and "Origin" arrow heads.

cadmando2
20th Oct 2010, 07:42 pm
That lisp routine will work, But I also found the Multileader line toolbar in AutoCAD 2008.
Thanks RenderMan

BlackBox
20th Oct 2010, 07:58 pm
You're welcome.