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

double arrow leader

36 REPLIES 36
Reply
Message 1 of 37
molokaiboy
17114 Views, 36 Replies

double arrow leader

Is there a way to draw a leader with an arrow head on both sides?

TIA

Collin
36 REPLIES 36
Message 2 of 37
Anonymous
in reply to: molokaiboy

Dimaligned? "molokaiboy" wrote in message news:32593365.1088724961778.JavaMail.jive@jiveforum2.autodesk.com... > Is there a way to draw a leader with an arrow head on both sides? > > TIA > > Collin
Message 3 of 37
Anonymous
in reply to: molokaiboy

With no text? Just a basic line with arrows on the end?

SEP1
Message 4 of 37
Anonymous
in reply to: molokaiboy

Yes, for a straight double-headed "leader". Act as though you want to override the text content of the dimension, and give it a space for "content". Suppress both extension lines. Any linear variety of dimension would work, and you could do the same for an arc version with Dimangular. As to a leader that's more than a single line or arc, well.... Kent Cooper, AIA "sep1" wrote... > With no text? Just a basic line with arrows on the end? > > SEP1
Message 5 of 37
Anonymous
in reply to: molokaiboy

Would creating a dimstyle with arrows at both ends and no extension lines work? "Kent Cooper, AIA" wrote in message news:40e54157_1@newsprd01... > Yes, for a straight double-headed "leader". Act as though you want to > override the text content of the dimension, and give it a space for > "content". Suppress both extension lines. Any linear variety of dimension > would work, and you could do the same for an arc version with Dimangular. > > As to a leader that's more than a single line or arc, well.... > > Kent Cooper, AIA > > > "sep1" wrote... > > With no text? Just a basic line with arrows on the end? > > > > SEP1 > >
Message 6 of 37
Anonymous
in reply to: molokaiboy

Yes, but you'd still have to give it the space-only text override when you used it. Kent Cooper, AIA "Warren Trost" wrote... > Would creating a dimstyle with arrows at both ends and no extension lines > work?
Message 7 of 37
Anonymous
in reply to: molokaiboy

Another approach.......... Here is a routine by Will Massie that I have modified. It is not a true leader. (defun ARCH:RAND*NO () (setq *NO (rtos (getvar "CDATE") 2 16) *NO (substr *NO 14 3) ;;3 ) (princ) ) (defun C:DBL (/ pt1 pt2 ptangle arrowlength arrowidth pt12 pt13 pt22 pt23 sb sset ) ;;(ARCH:F_S-VAR) (setq SSET (ssadd)) ;;(cond ((= ARCH#CLAY "Off") (ARCH:LYR "A-DIMS"))) (setvar "orthomode" 1) (setvar "osmode" 0) ;;(setq pt1 (osnap (getpoint "\n* Specify first point *") "nea")) ;;(setq pt2 (osnap (getpoint pt1 "\n* Specify end point *") "nea")) (setq pt1 (getpoint "\n* Specify first point *")) (setq pt2 (getpoint pt1 "\n* Specify end point *")) (setq pt1 (list (float (car pt1)) (float (cadr pt1)))) (setq pt2 (list (float (car pt2)) (float (cadr pt2)))) (setq ptangle (angle pt1 pt2)) (command "line" pt1 pt2 "") (setq SB (entlast)) (setq SSET (ssadd SB SSET)) (setq arrowlength (* (* (getvar "dimscale") (getvar "dimasz")) 2.125)) (setq arrowidth (/ arrowlength 3)) (setq pt12 (polar (polar pt1 ptangle arrowlength) (+ ptangle 1.570796327) (/ arrowidth 2) ) ) (setq pt13 (polar (polar pt1 ptangle arrowlength) (- ptangle 1.570796327) (/ arrowidth 2) ) ) (command "solid" pt1 pt12 pt13 "" "") (setq SB (entlast)) (setq SSET (ssadd SB SSET)) (setq pt22 (polar (polar pt2 (+ ptangle 3.141592654) arrowlength) (+ ptangle 1.570796327) (/ arrowidth 2) ) ) (setq pt23 (polar (polar pt2 (+ ptangle 3.141592654) arrowlength) (- ptangle 1.570796327) (/ arrowidth 2) ) ) (command "solid" pt2 pt22 pt23 "" "") (setq SB (entlast)) (setq SSET (ssadd SB SSET)) (ARCH:RAND*NO) (setq NIC (strcat "DBL-" *NO)) (command "-group" "" (princ NIC) "" (princ SSET) "") ;;(ARCH:F_R-VAR) (princ) ) To stretch the double leader on an angle use the following routine to set the snapangle: (defun C:SA (/ bbl bbpt bbn bbp1 bbp2 bba) (prompt "\n* Set Snapang...by picking a Line *") (setq bbl (entsel "\n* Select the Line *")) (setq bbpt (osnap (cadr bbl) "end")) (setq bbn (entget (car bbl))) (setq bbp1 (cdr (assoc 10 bbn)) bbp2 (cdr (assoc 11 bbn)) ) (setq bba (angle bbp1 bbp2)) (setvar "SNAPANG" bba) (princ) ) Gary "molokaiboy" wrote in message news:32593365.1088724961778.JavaMail.jive@jiveforum2.autodesk.com... > Is there a way to draw a leader with an arrow head on both sides? > > TIA > > Collin
Message 8 of 37
molokaiboy
in reply to: molokaiboy

yes, no text. I am trying to create a routine that will prompt the user to pick two points opposite each other, and have an arrow on each side, basically a mirrored dimleader.

Collin
Message 9 of 37
Anonymous
in reply to: molokaiboy

For a start, how about... (command "_.DIMALIGNED" pause pause "_Text" "" "@" "" ) "molokaiboy" wrote in message news:20363150.1088793300786.JavaMail.jive@jiveforum2.autodesk.com... > yes, no text. I am trying to create a routine that will prompt the user to pick two points opposite each other, and have an arrow on each side, basically a mirrored dimleader. > > Collin
Message 10 of 37
Anonymous
in reply to: molokaiboy

(defun C:DAL () (setq ARRSIZ (getvar "TEXTSIZE")) (setq P1 (getpoint "\nPick 1st end of Double Arrowhead Line ? ")) (if P1 (setq P2 (getpoint P1 "\nPick 2nd end of Double Arrowhead Line ? "))) (if (and P1 P2 (setq DD (distance P1 P2)) (< (* ARRSIZ 2) DD)) (progn (setq P3 (polar P1 (angle P1 P2) ARRSIZ)) (setq P4 (polar P2 (angle P2 P1) ARRSIZ)) (command "PLINE" P1 "W" 0 (* ARRSIZ 0.5) P3 "W" 0 0 P4 "W" (* ARRSIZ 0.5) 0.0 P2 "") ) (cond ((not P1) (princ "\n1st point not selected.")) ((not P2) (princ "\n2nd point not selected.")) ((<= DD (* ARRSIZ)) (princ "\nPoints too close together.")) ) ) (princ) )
Message 11 of 37
molokaiboy
in reply to: molokaiboy

That is exactly it. Thanks!!

Collin
Message 12 of 37
Anonymous
in reply to: molokaiboy

You could do two overlapping leaders between the same endpoints, going opposite directions. If you use a "real" Leader, NOT a dimleader, it would work as you'd want it to if you stretched an end, etc. (setq arrowhead1 (getpoint "Pick one Endpoint: ")) (setq arrowhead2 (getpoint "Pick other Endpoint: ")) (command "LEADER" arrowhead1 arrowhead2 "" "" "N") (command "LEADER" arrowhead2 arrowhead1 "" "" "N") Kent Cooper, AIA "molokaiboy" wrote... > yes, no text. I am trying to create a routine that will prompt the user to pick two points opposite each other, and have an arrow on each side, basically a mirrored dimleader. > > Collin
Message 13 of 37
Anonymous
in reply to: molokaiboy

I wouldn't like this variety, because if you need to stretch it, unless the stretching direction is in line with the end-to-end direction, you're not going to like what you're left with. See my other one using actual Leaders. Kent Cooper, AIA "Alan Henderson wrote... > (defun C:DAL () > (setq ARRSIZ (getvar "TEXTSIZE")) > (setq P1 (getpoint "\nPick 1st end of Double Arrowhead Line ? ")) > (if P1 (setq P2 (getpoint P1 "\nPick 2nd end of Double Arrowhead Line ? > "))) > (if (and P1 P2 (setq DD (distance P1 P2)) (< (* ARRSIZ 2) DD)) > (progn > (setq P3 (polar P1 (angle P1 P2) ARRSIZ)) > (setq P4 (polar P2 (angle P2 P1) ARRSIZ)) > (command "PLINE" P1 "W" 0 (* ARRSIZ 0.5) P3 "W" 0 0 P4 "W" (* ARRSIZ > 0.5) 0.0 P2 "") > ) > (cond > ((not P1) (princ "\n1st point not selected.")) > ((not P2) (princ "\n2nd point not selected.")) > ((<= DD (* ARRSIZ)) (princ "\nPoints too close together.")) > ) > ) > (princ) > ) > >
Message 14 of 37
Anonymous
in reply to: molokaiboy

I totally agree, but sometimes people want simple methods and this was a 2 minute program exercise.
Message 15 of 37
Anonymous
in reply to: molokaiboy

Well, if yours was a two-minute exercise, mine was a ONE-minute exercise (maybe 1-1/2). So there! And if people are looking for simple, I think mine's simpler. But it's always enlightening to see the different ways things can be approached. Under some future circumstance, someone's going to think, "I remember somebody doing...." Kent Cooper, AIA "Alan Henderson wrote... > I totally agree, but sometimes people want simple methods and this was a 2 > minute program exercise. > >
Message 16 of 37
Anonymous
in reply to: molokaiboy

BTW, "2 minute exercise" was a euphemism. Also, dimension can be accidentally or purposely updated and there goes the original look of the arrows, leaders, etc.
Message 17 of 37
Anonymous
in reply to: molokaiboy

Alan Henderson wrote... > Also, dimension can be accidentally or purposely updated and there goes the > original look of the arrows, leaders, etc. Such considerations cut both ways. Suppose you wanted to copy some selection set containing one of these into another drawing at a different scale. Different arrowhead sizes would be appropriate. With leaders using a dimension Style, presumably Dimscale would be appropriately different in the new drawing, and simply "updating" the leaders would correct the arrowhead size of both (all) arrows at once. Imagine what it would take to do the same with a variable-width polyline, requiring adjusting the length of the tapering arrowhead portions as well as their width at the wider ends, and doing both of those things for both arrowheads. (It would probably be easier to draw it again.) And if the angle of the thing is oddball.... And if the copied stuff contains a whole bunch of them.... Another potential problem with stretching the polyline variety is that, even if you're stretching in the end-to-end direction so the arrowheads remain pointing in the same direction as the line between them, if you don't happen to include BOTH ENDS of the arrowhead in the selection crossing window, the line part stays where it is and you get a whacked-out arrowhead. With the leader variety, all you need to catch is the tip of the arrow (or a lot more than that -- it doesn't make any difference). The arrowhead always remains the same size, and is always oriented right in relation to the line. Kent Cooper, AIA
Message 18 of 37
molokaiboy
in reply to: molokaiboy

this works as well, but why does it snap to certain points when I have my osnaps set to nearest and perpendicular?

Collin
Message 19 of 37
Anonymous
in reply to: molokaiboy

That probably depends on what else is around, how big you Osnap aperture is, etc. You could override that possibility: (setq arrowhead1 (getpoint "Pick one Endpoint: ") "non") (setq arrowhead2 (getpoint "Pick other Endpoint: ") "non") (command "LEADER" "non" arrowhead1 "non" arrowhead2 "" "" "N") (command "LEADER" "non" arrowhead2 "non" arrowhead1 "" "" "N") Or you could turn Osnap off first, or set OSMODE to negative, then set things back afterwards. Kent Cooper, AIA "molokaiboy" wrote... > this works as well, but why does it snap to certain points when I have my osnaps set to nearest and perpendicular? > > Collin
Message 20 of 37
molokaiboy
in reply to: molokaiboy

No go...After I select the first point, the second point snaps to a perpendicular point which is not perpendicular to the first point selected. Any ideas?

Collin

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

Post to forums  

Autodesk Design & Make Report

”Boost