Leaders with no text annotation
I am wanting to just add lines/ splines with an arrow on one end between points but with no text attached.
I can 'blunder' my way through this but its just that - 'blunder'.
Is there a simple way to add Leaders between entities that doesn't involve text please.
regards
Comments
-
You just go LE(der)<ret> point, point,... <ret><ret> N(one)<ret>.
I have a lisp which starts at the normal second point, then the arrow end, then adds one optional tail without adding text, if you want it.
0 -
The following command macro creates a 2-segment leader with no text: _DIMLEADER;\\\;;n
Create a new tool in the CUSTOMIZE dialog, then assign the tool to a keyboard shortcut or add it to a custom toolbar.
0 -
thanks for the answers.
Louis that works well and the customised toolbar is very good. and I wouldn't mind your lisp routine John thanks.
I can play around with both then.LE(der)<ret> point, point,... <ret><ret> N(one)<ret>. I was doing that in a roundabvout way in my messing about. Now I understand it, my blundering has ended. Thanks
0 -
(Defun c:mylead (/ a b c)
(SETVAR "ORTHOMODE" 0)
(setq a (getpoint "\nPick Leader End Point: ")
b (getpoint a "\nPick Leader Start Point: "))
(SETVAR "ORTHOMODE" 1)
(IF (NOT (setq c (getpoint a)))(SETQ C A))
(SETVAR "ORTHOMODE" 1)
(command "leader" b a c "" "" "n")
(SETVAR "ORTHOMODE" 0)
)0 -
thanks John - works very nicely. Created an alias and voila!
Is there a simple way to set the leader to a spline before the process starts?
Sorry , should have asked all the questions first.
regards0 -
The command asks for a first and second point before giving options. I think you would have to add in variations you want, predicting what will be asked. Like a script. I modify leaders to splined later if I need them, but since I usually don't I keep it simple. Rather than interrupt for variations I would make a separate lisp or change that one to make splines.
0 -
Here is a routine I use all the time, called "qldr" - similar to AutoCad's quickleader command. I suppose you could add to the last command line to make the straight line leader a spline.
(defun C:qldr ( / pt ptlst)
(setq ptlst (list (setq pt(getpoint "\nStart of leader.."))))
(command "._pline" pt)
(while pt (setq pt (getpoint pt "\nNext leader point.."))
(if pt (setq ptlst (append ptlst (list pt))))
(command pt)
)
(command "_.erase" "L" "")
(command "_.LEADER" ptlst "" "" "_n")
)0 -
Steven, thanks for the leader code. I am attempting to do the modifications to make it do spline leaders without, text and another with text. However, my LISP expereience is around 20 years old, so I am more than a bit rusty. I have tried a zillion variations on that last line, and I can't get it to do Mtext.It is as though it is ignoring the "Mtext" part of my command.
Any ideas what I am doing wrong?
Joe Dunfee
Here is my LISP, followed by the results copied from the command line history;
;Creates a spline leader with text.
;slt is for spline leader.
(defun C:slt ( / pt ptlst)
(setq ptlst (list (setq pt(getpoint "\nStart of leader.."))))
(command "._pline" pt)
(while pt (setq pt (getpoint pt "\nNext leader point.."))
(if pt (setq ptlst (append ptlst (list pt))))
(command pt)
)
(command "_.erase" "L" "")
(command "_.LEADER" ptlst "format" "spline" "exit" "" "" "Mtext")
)============
: slt
Start of leader..
: ._pline
ENTER to use last point/Follow/<Start of polyline>:
Arc/Distance/Follow/Halfwidth/Width/<Next point>:
Next leader point..
Arc/Distance/Follow/Halfwidth/Width/Undo/<Next point>:
Next leader point..
: _.erase
Select entities to delete: L
Entities in set: 1
Select entities to delete:
: _.LEADER
Start of leader:
Next point:
To point: Format/Undo/<Annotation>: format
Arrow/None/SPline/STraight/<Exit>: spline
Arrow/None/SPline/STraight/<Exit>: exit
To point: Format/Undo/<Annotation>:
First line of annotation text/<options>:
Dimension text options: Block/Copy/None/Tolerance/<Mtext>: Mtext
First line of annotation text/<options>: nil
First line of annotation text/<options>:0 -
Try this:
;Creates a spline leader with text.
;slt is for spline leader.
(defun C:slt ( / pt ptlst)
(setq ptlst (list (setq pt(getpoint "\nStart of leader.."))))
(command "._pline" pt)
(while pt (setq pt (getpoint pt "\nNext leader point.."))
(if pt (setq ptlst (append ptlst (list pt))))
(command pt)
)
(command "_.erase" "L" "")
; (command "_.LEADER" ptlst "format" "spline" "exit" "" "" "Mtext")
(command "_.LEADER" ptlst "F" "SP" "E" "" "" "" "" "")
)0 -
@ Joe Dunfee:
If you want a spline leader with text you could also consider a macro:
http://forum.bricsys.com/discussion/16005Two lisp solutions using your and Steven's code as a starting point:
; Creates a spline leader with text.
; slt is for spline leader.
(defun c:slt ( / pt ptlst)
(setvar 'cmdecho 0)
(setq ptlst (list (setq pt (getpoint "\nStart of leader: "))))
(command "._pline" pt)
(while pt (setq pt (getpoint pt "\nNext point: "))
(if pt (setq ptlst (append ptlst (list pt))))
(command pt)
)
(command "_.erase" "_last" "")
(command "_.leader" ptlst "_format" "_spline" "_exit" "_annotation")
(princ "\nFirst line of annotation text: ")
(setvar 'cmdecho 1)
(while (> (getvar 'cmdactive) 0)
(command pause)
)
(princ)
)
(defun c:slt2 ( / pt ptlst)
(setvar 'cmdecho 0)
(if
(and
(setq pt (getpoint "\nStart of leader: "))
(setq ptlst (list pt))
(setq pt (getpoint pt "\nNext point: "))
(setq ptlst (append ptlst (list pt)))
)
(progn
(command "_.leader" ptlst "_annotation" "" "_none")
(while (setq pt (getpoint pt "\nNext point: "))
(setq ptlst (append ptlst (list pt)))
(command "_.erase" "_last" "")
(command "_.leader" ptlst "_format" "_spline" "_exit" "_annotation" "" "_none")
)
(command "_.erase" "_last" "")
(command "_.leader" ptlst "_format" "_spline" "_exit" "_annotation")
(princ "\nFirst line of annotation text: ")
(setvar 'cmdecho 1)
(while (> (getvar 'cmdactive) 0)
(command pause)
)
(princ)
)
)
(princ)
)0 -
Thanks Roy for reminding us of that simple one-liner to make the spline and allow for text. I had gotten lost in the forest and only saw trees.
Joe Dunfee
0