Leader Lisp - needs help

Discussion in 'AutoCAD' started by chetz, Nov 15, 2004.

  1. chetz

    chetz Guest

    this lisp routine allows you to draw a leader and after entering A for arc, the pline changes to an arc.

    I have been asked to modify this so after it draws the first arc, it continues a second arc at the end of the first arc.

    please help.

    (defun c:NLEADER()
    (prompt "\n Are the DIMSCALE and DIMASZ variables set? ")
    (setq SP (getpoint "\n Arrow start point"))
    (setq ANGP (getpoint SP "\n Arrow angle"))
    (setq ARRANG (angle SP ANGP))
    (if (= 0.0 (getvar "DIMASZ"))
    (setq LENG 1.0)
    (setq LENG (* 1.3 (getvar "DIMASZ")))
    )
    (setq EP (polar SP arrang (* LENG (getvar "DIMSCALE"))))
    (setq PLENG (* 0.20 LENG (getvar "DIMSCALE")))
    (command ".PLINE" SP "W" "0.0" PLENG EP "W" "0.0" "0.0" "")
    (command ".PLINE" EP "LINE" PAUSE PAUSE "")
    (COMMAND ".CHANGE" (ENTLAST) "" "P" "LT" "CONTINUOUS" "P" "C" "7")
    (COMMAND "")
    )
     
    chetz, Nov 15, 2004
    #1
  2. I strongly recommend using Spline-form Leaders instead. Real Leaders have
    many advantages over "faking" it this way with varying-width polylines,
    including that they are made with a basic command so they require loads less
    code, and that their arrowheads AND (in the Spline form) the flow of their
    curves adjust themselves if you have to change the route of them for any
    reason.
     
    Kent Cooper, AIA, Nov 15, 2004
    #2
  3. chetz

    C Witt Guest

    while splines may be easier to work with.. arcs look 100x better, and
    are worth the troubles. (IMHO)
     
    C Witt, Nov 15, 2004
    #3
  4. chetz

    chetz Guest

    Can you take your discussion outside please ?
    I didn't want to initiate an argument on splines.
    :)

    I dont know Lisp, but i realize its fairly easy to just program into the lisp a line that starts another pline that starts at the endpoint of the first pline.
     
    chetz, Nov 18, 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.