Looking for a lisp routine that will add multiple leader lines to a single line of text. Any Ideas?
|
Looking for a lisp routine that will add multiple leader lines to a single line of text. Any Ideas?
I use this:
Code:(defun c:ml (/ osn pl ip ) (setvar "cmdecho" 0) (setq osn (getvar "osmode")) (setq pl (getpoint "\n Connected to :")) (setvar "osmode" 0) (setq ip (getpoint pl "\n Arrow :")) (while ip (if ip (command "leader" ip pl "" "" "n" ^c^c)) (setq ip (getpoint pl "\n Next arrow :")) ) (setvar "osmode" osn) (princ) )
One is a pointer (arrow and line only) the other is a leader.
I stripped out the basics of what i use. hopefully, they still work.
Code:;;; BEGINNING VERSION 1.8 (DEFUN c:newpointer (/ |clayer| |cmdecho| |olderror| |orthomode| |polarmode|) (COMMAND "undo" "begin") (SETQ |orthomode| (GETVAR "orthomode")) (SETQ |polarmode| (GETVAR "polarmode")) (SETVAR "orthomode" 0) (SETVAR "polarmode" 0) (COMMAND "leader" pause pause "" "" "n") (SETVAR "orthomode" |orthomode|) (SETVAR "polarmode" |polarmode|) (COMMAND "undo" "end") (PRINC) ) ;_ end of DEFUN ;;; BEGINNING VERSION 1.9 (DEFUN c:newleadonly (/ |ang1| |ang| |autosnap| |clayer| |cmdecho| |dimexe1| |dimexe| |dimgap1| |dimgap| |dimscale| |dist| |olderror| |orthomode| |osmode| |polarmode| |pt1| |pt2| |pt3| |pt4| ) (COMMAND "undo" "begin") (SETQ |cmdecho| (GETVAR "cmdecho")) (SETQ |dimexe| (GETVAR "dimexe")) (SETQ |dimgap| (GETVAR "dimgap")) (SETQ |dimscale| (GETVAR "dimscale")) (SETQ |orthomode| (GETVAR "orthomode")) (SETQ |osmode| (GETVAR "osmode")) (SETQ |polarmode| (GETVAR "polarmode")) (SETVAR "cmdecho" 1) (SETVAR "orthomode" 0) (SETVAR "polarmode" 0) (SETVAR "osmode" 0) (SETQ |pt1| (GETPOINT "\nSpecify leader start point: ")) ;;; (setvar "osmode" 64) (SETQ |pt2| (GETPOINT |pt1| "\nSelect insert point of text: ")) ;;; (setvar "osmode" 0) (SETQ |dimgap1| (* |dimgap| |dimscale|)) (SETQ |dimexe1| (* |dimexe| |dimscale|)) (SETQ |dist| (+ |dimexe1| |dimgap1|)) (SETQ |ang| (ANGLE |pt2| |pt1|)) (PROGN (IF (< |ang| (/ PI 2)) (SETQ |ang1| 0.0) (IF (> |ang| (* (/ PI 2) 3)) (SETQ |ang1| 0.0) (SETQ |ang1| PI) ) ;_ end of IF ) ;_ end of IF ) ;_ end of PROGN (SETQ |pt4| (POLAR |pt2| |ang1| |dimgap1|)) (SETQ |pt3| (POLAR |pt2| |ang1| |dist|)) (COMMAND "leader" |pt1| |pt3| |pt4| "" "" "n") (SETVAR "cmdecho" |cmdecho|) (SETVAR "orthomode" |orthomode|) (SETVAR "osmode" |osmode|) (SETVAR "polarmode" |polarmode|) (COMMAND "undo" "end") (PRINC) ) ;_ end of DEFUN
?? are you using text or mtext with you leaderOriginally Posted by dluzius
If using mtext see no need for list just
a button on a tool bar to do step 2 and 3 my be of help.
- Add a leader using the leader command
- copy the leader (only the leader not the mtext)
- use the QLATTACH command to attach the leader you copy to the mtext
- repeat step 2 and 3 number of times needed
Code:^C^C_copy;\\\\QLATTACH;L;\
Last edited by jwanstaett; 2006-09-15 at 03:14 PM.
We use a LISP routine that uses mtext and then depending the size of the original box it place makes as many leaders as you want until you exit the command.
See pic.
If this is what you would like I could post it.
Brian