double arrow leader

Discussion in 'AutoCAD' started by molokaiboy, Jul 2, 2004.

  1. molokaiboy

    molokaiboy Guest

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

    TIA

    Collin
     
    molokaiboy, Jul 2, 2004
    #1
  2. molokaiboy

    David Kozina Guest

    Dimaligned?
     
    David Kozina, Jul 2, 2004
    #2
  3. molokaiboy

    sep1 Guest

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

    SEP1
     
    sep1, Jul 2, 2004
    #3
  4. 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...
     
    Kent Cooper, AIA, Jul 2, 2004
    #4
  5. molokaiboy

    Warren Trost Guest

    Would creating a dimstyle with arrows at both ends and no extension lines
    work?
     
    Warren Trost, Jul 2, 2004
    #5
  6. Yes, but you'd still have to give it the space-only text override when you
    used it.

    Kent Cooper, AIA


    ...
     
    Kent Cooper, AIA, Jul 2, 2004
    #6
  7. molokaiboy

    GaryDF Guest

    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
     
    GaryDF, Jul 2, 2004
    #7
  8. molokaiboy

    molokaiboy Guest

    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
     
    molokaiboy, Jul 2, 2004
    #8
  9. molokaiboy

    David Kozina Guest

    For a start, how about...

    (command
    "_.DIMALIGNED"
    pause
    pause
    "_Text"
    ""
    "@"
    ""
    )


    to pick two points opposite each other, and have an arrow on each side,
    basically a mirrored dimleader.
     
    David Kozina, Jul 2, 2004
    #9
  10. (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)
    )
     
    Alan Henderson @ A'cad Solutions, Jul 2, 2004
    #10
  11. molokaiboy

    molokaiboy Guest

    That is exactly it. Thanks!!

    Collin
     
    molokaiboy, Jul 2, 2004
    #11
  12. 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.

    <set layer, pick dim Style with the right arrows, check any sysvars you
    want, maybe turn Ortho off, etc.>
    (setq arrowhead1 (getpoint "Pick one Endpoint: "))
    (setq arrowhead2 (getpoint "Pick other Endpoint: "))
    (command "LEADER" arrowhead1 arrowhead2 "" "" "N")
    (command "LEADER" arrowhead2 arrowhead1 "" "" "N")
    <reset anything, etc.>

    Kent Cooper, AIA


    to pick two points opposite each other, and have an arrow on each side,
    basically a mirrored dimleader.
     
    Kent Cooper, AIA, Jul 2, 2004
    #12
  13. 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...
     
    Kent Cooper, AIA, Jul 2, 2004
    #13
  14. I totally agree, but sometimes people want simple methods and this was a 2
    minute program exercise.
     
    Alan Henderson @ A'cad Solutions, Jul 2, 2004
    #14
  15. 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...
     
    Kent Cooper, AIA, Jul 2, 2004
    #15
  16. 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.
     
    Alan Henderson @ A'cad Solutions, Jul 2, 2004
    #16
  17. Alan Henderson wrote...

    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
     
    Kent Cooper, AIA, Jul 2, 2004
    #17
  18. molokaiboy

    molokaiboy Guest

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

    Collin
     
    molokaiboy, Jul 2, 2004
    #18
  19. 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 <as suggested as a possibility in the lead-up stuff> turn Osnap
    off first, or set OSMODE to negative, then set things back afterwards.

    Kent Cooper, AIA


    osnaps set to nearest and perpendicular?
     
    Kent Cooper, AIA, Jul 2, 2004
    #19
  20. molokaiboy

    molokaiboy Guest

    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
     
    molokaiboy, Jul 2, 2004
    #20
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.