dim leader variable

Discussion in 'AutoCAD' started by ads, Jan 31, 2004.

  1. ads

    ads Guest

    I am getting a gap between my user arrowhead and the leader line. My
    arrowhead is smaller than the "closed filled" that I usually use. Does
    anyone know if there is a variable that takes care of this?
     
    ads, Jan 31, 2004
    #1
  2. ads

    Walt Engle Guest

    No, but here is a leader lsp routine you may like. Load it and type "ldr"
    (without the quotes, of course).




    (defun c:ldr ( / np g:ts ts n tdata p1 p2 p3 p4)
    (graphscr)
    (setvar "osmode" 0)
    (prompt "\nDraws leader with a standard arrowhead and text [NO
    OPTIONS]")
    (terpri)
    (setq g:ts (* 0.125 (getvar "dimscale")))
    (setq asz (getvar "dimasz"))
    (setq asz (* asz (getvar "dimscale")))
    (setq woah (/ asz 3.0))
    (setq ts g:ts)
    (setvar "textsize" ts)
    (setq n 0)
    (c:ldr1)
    (setq tdata nil)
    (while (/= "" (setq tl (getstring t "\nEnter text: ")))
    (setq tdata (cons tl tdata))
    )

    (setq htet (getdist (strcat "\n<Current text Height>/or Enter new
    text Height <"
    (rtos (/ (getvar "textsize")(getvar "dimscale")))
    ">: ")))

    (if (null htet)(setq htet (/ (getvar "textsize")(getvar
    "dimscale"))))
    ;(setq ts (* htet (getvar "dimscale")))
    ;(if (<= htet 0.125)(command "-layer" "s" "0" ""))
    ;(if (> htet 0.125)
    ;(progn
    (if (> htet 0.375)(command "-layer" "s" "0" ""))
    ;)
    ;)

    (setq tdata (reverse tdata))
    (if (<= (car p1)(car p2))
    (progn
    (setq p3 (list (+ (car p2) g:ts)(cadr p2))
    p4 (list (+ (car p3) g:ts)(- (cadr p3)(* 0.5 ts)))
    )
    (command "line" p2 p3 "")
    (repeat (length tdata)
    (command "text" p4 ts 0 (nth n tdata))
    (setq p4 (polar p4 (* 1.5 pi)(* 1.75 ts)))
    (setq n (1+ n))
    )
    )
    )
    (if (> (car p1)(car p2))
    (progn
    (setq p3 (list (- (car p2) g:ts)(cadr p2))
    p4 (list (- (car p3) g:ts)(- (cadr p2)(* 0.5 ts)))
    )
    (command "line" p2 p3 "")
    (repeat (length tdata)
    (command "text" "r" p4 ts 0 (nth n tdata))
    (setq p4 (polar p4 (* 1.5 pi)(* 1.75 ts)))
    (setq n (1+ n))
    )
    )
    )
    (princ)
    (SETVAR "OSMODE" 32)
    )
    ;
    (defun c:ldr1 ()
    (initget 1)
    (setq p1 (getpoint "\nStart leader (Tip of arrowhead): "))
    (initget 1)
    (setq p2 (getpoint p1 "\nNext point on leader or end: "))
    (setq p3 (polar p1 (angle p1 p2) (* 1.5 g:ts)))
    (command "Pline" p1 "w" "0" (* 0.5 g:ts) p3 "w" "0" "" p2)
    (while
    (setq np (getpoint (getvar "lastpoint") "\nNext point on
    leader or <ENTER> to end: "))
    (if (/= np "")
    (progn
    (setq p1 (getvar "lastpoint"))
    (setq p2 np)
    (command p2)
    )
    )
    (if (= np "")
    (command "")
    )
    )
    )
     
    Walt Engle, Jan 31, 2004
    #2
  3. ads

    CAB2k Guest

    Sounds like your insert point on your arrow block is no on the edge of the arrow.

    CAB
     
    CAB2k, Feb 1, 2004
    #3
  4. ads

    Doug Broad Guest

    The arrow block must fit "exactly" inside a 1 unit x 1 unit
    square. If it does not, then the gap will appear. You may
    make the arrow as small as you wish within that 1x1 square
    as long as you add a short leader so that the distance across
    the arrow/leader is 1 unit.

    Using smaller arrows is best handled by setting dimasz rather
    than drawing the arrow smaller.
     
    Doug Broad, Feb 1, 2004
    #4
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.