my qleader setting keep re-setting

Discussion in 'AutoCAD' started by Dave F, Sep 15, 2003.

  1. Dave F

    Dave F Guest

    Hi

    It keeps re-setting to the default of Mtext.
    I want to set it back using the command line or programmatically.
    I searched google and somebody called Rob Tompson supposedly wrote a
    solution, but the attachments aren't displayed in google.

    Does anybody have this routine?

    Can I get google to display attachments?

    Thanks in advance

    Dave F.
     
    Dave F, Sep 15, 2003
    #1
  2. Dave F

    Walt Engle Guest

    You want a leader without mtext? Try this

    ; LDR.LSP
    (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" "2" ""))
    ;)
    ;)

    (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, Sep 15, 2003
    #2
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.