Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Force 2 point Qleader Horizontal

7 REPLIES 7
Reply
Message 1 of 8
Anonymous
529 Views, 7 Replies

Force 2 point Qleader Horizontal

I have searched around without success, and posted in the 2004 section without success. I dont know if what I am asking cant be done, or if I am just not asking it clearly enough.

I would like to force the second line on a 2 point qleader horizontal regardless of the angle between the text and the arrow endpoint. Currently, on my machine, at about a 15 degree or shallower angle from the horizontal, the second line will disappear and the leader will appear as a single line.

This can be solved with a 3 point qleader, but when the leader text is moved the leader turns into a 3 line leader.

Is there any way to accomplish this?

Please see the attachment. The top arrow is what I want, except I had to make that with a 3 point leader. The middle arrow is what happens on a 2 point leader with a shallow angle. The bottom arrow is a typical 2 point leader that I know and love, except when my annotation gets crowded and I need that 30 degree arc.

Thanks.
7 REPLIES 7
Message 2 of 8
Anonymous
in reply to: Anonymous

Not that I have a solution, I just agree wholeheartedly that the straight
leader looks "wrong". Craig


wrote in message news:5368930@discussion.autodesk.com...
I have searched around without success, and posted in the 2004 section
without success. I dont know if what I am asking cant be done, or if I am
just not asking it clearly enough.

I would like to force the second line on a 2 point qleader horizontal
regardless of the angle between the text and the arrow endpoint. Currently,
on my machine, at about a 15 degree or shallower angle from the horizontal,
the second line will disappear and the leader will appear as a single line.

This ca
n be solved with a 3 point qleader, but when the leader text is moved the
leader turns into a 3 line leader.

Is there any way to accomplish this?

Please see the attachment. The top arrow is what I want, except I had to
make that with a 3 point leader. The middle arrow is what happens on a 2
point leader with a shallow angle. The bottom arrow is a typical 2 point
leader that I know and love, except when my annotation gets crowded and I
need that 30 degree arc.

Thanks.
Message 3 of 8
cvc-it-mb
in reply to: Anonymous

Why not use ORTHO mode?
If you need to rotate your cross-hairs, use this little lisp which allows you to pick 2 points and it then rotates your SNAPANG. To reset, just type SNAPANG 0.

(defun C:SNAPPOINTS (/ BP EP)
;;Align crosshairs to picked points
;;by Jim Smith 2002
(if(setq BP (getpoint "\nPick points:"))
(if(setq EP (getpoint BP "\nPick points:"))
(setvar "SNAPANG" (angle BP EP))))
(princ)
)
Message 4 of 8
Anonymous
in reply to: Anonymous

ORTHO will give me a horizontal leader for both line segments, which is not what I am looking for. I still want the angled leader, but I also want to use the space where the 2 point, 2 segment leader line turns into a 1 segment line automagically.

Please see the attachment. The box is the approximate area where the 2 segment lines turn into 1 segment lines.

Thanks.
Message 5 of 8
cvc-it-mb
in reply to: Anonymous

I meant you turn on ORTHO when drawing the second segment only.

What you want is not possible as the criteria for the leader lines at certain angle are built into the program. So a 2 segment leader where you draw the second segment horizontally is your only solution. Somebody could write a lisp that eliminates 1 or 2 steps, but ultimately you end up with the same results. Message was edited by: CVC CAD Manager
Message 6 of 8
Anonymous
in reply to: Anonymous

Ah.

On a 2 point qleader, the second segment is drawn automatically. You just click the start and end points.
Message 7 of 8
cvc-it-mb
in reply to: Anonymous

Sorry, 2 segments = 3 point leader....
Message 8 of 8
Anonymous
in reply to: Anonymous

Hi
This lisp will be fix 2 points as you want
Change arrow size to your standards and uncomment
osmode if you need
Give this a try

Fatty

~'J'~

[code]
;++++++++++++++++++++++++;
(defun C:fld
(/ acsp adoc lead mtextobj mtpt p1 p2 p3 ptlist tmparray tmpvar )
(vl-load-com)
(or adoc
(setq adoc (vla-get-activedocument
(vlax-get-acad-object))))
(or acsp (setq acsp (if (= (getvar "CVPORT") 1)
(vla-get-paperspace
adoc)
(vla-get-modelspace
adoc)
)
)
)
(vla-endundomark
adoc)
(vla-startundomark
adoc)
;(setvar "osmode" 1)
(while
(setq p1 (getpoint "Specify leader start point (press Enter to stop): "))
(setq ptlist (cons p1 ptlist))
;(setvar "osmode" 0)
(setvar "orthomode" 0)
(while (null p3)
(setq p2 (getpoint "Specify next point: " p1))
(setq ptlist (cons p2 ptlist))
(setvar "orthomode" 1)
(setq p3 (getpoint "Specify end point: " p2))
(setq ptlist (cons p3 ptlist))

)
;(setvar "osmode" 1)
(setvar "orthomode" 0)
(setq mtpt (car ptlist))
(setq ptlist (reverse ptlist))

(setq mtextobj (vla-addmtext
acsp
(vlax-3d-point mtpt)
0.0
(getstring T "\nEnter leader text: ")
)
)

(if (< (car p1)(car p2))
(vla-put-attachmentpoint
mtextobj
acattachmentpointmiddleleft
)
(vla-put-attachmentpoint
mtextobj
acAttachmentPointMiddleRight
)
)
(setq ptlist (apply 'append ptlist))
(setq tmparray
(vlax-make-safearray
vlax-vbdouble
(cons 0 (- (length ptlist) 1))
)
)
(vlax-safearray-fill tmparray ptlist)
(setq tmpvar (vlax-make-variant tmparray))

(setq lead (vla-addleader acsp tmpvar mtextobj aclinewitharrow))
(vla-put-arrowheadsize lead 150.); change to your standards
(vla-put-verticaltextposition lead acvertcentered)
(vla-put-insertionpoint mtextobj (vlax-3d-point mtpt))
(vla-put-coordinate lead 2 (vlax-3d-point mtpt))
(vla-update lead)
(vlax-release-object mtextobj)
(vlax-release-object lead)
(setq ptlist nil p3 nil)
)
(setvar "osmode" 703)
(vla-regen adoc acactiveviewport)
(vla-endundomark
adoc)
(princ)
)
;(C:fld)[/code]

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost