How convert a Spline to a curved leader

Discussion in 'AutoCAD' started by Scott Mcfarren, Sep 21, 2004.

  1. Does anybody have code to convert a spline or read its points so I can
    create
    a curved leader (with arrowhead) reasonably close ???

    Thanks,

    Scott McFarren
     
    Scott Mcfarren, Sep 21, 2004
    #1
  2. Scott Mcfarren

    Jim Claypool Guest

    You can export it to an R12 dxf, open the dxf and save it as a drawing, then
    insert it into you original drawing exploded.
     
    Jim Claypool, Sep 22, 2004
    #2
  3. Scott Mcfarren

    Jim Claypool Guest

    This will get fairly close.
    There is no error checking and
    the arrowhead is separated from the leader when finished.

    (defun c:mkleader ()
    (setq ename (car (entsel "\nSelect spline: ")))
    (setq ptlist nil)
    (setq ecnt 0 elen (length (entget ename)))
    (while (< ecnt elen)
    (setq element (nth ecnt (entget ename)))
    (if (equal (car element) 10)
    (setq ptlist (cons (cdr element) ptlist))
    );end setq
    (setq ecnt (1+ ecnt))
    );end while
    (setq ptlist (reverse ptlist))
    (command ".leader")
    (foreach x ptlist
    (command x)
    )
    (command
    "" "o" ""
    ".erase" (entlast) ""
    ".explode" (entlast)
    ".pedit" (entlast) "spline" ""
    )
    (princ)
    )
     
    Jim Claypool, Sep 22, 2004
    #3
  4. Thanks Jim. I'll give it a try.

    Scott

     
    Scott Mcfarren, Sep 22, 2004
    #4
  5. Scott Mcfarren

    Charliep Guest

    Scott:

    A2K4 does have an option under the Leader Line & Arrow TAB/ Leader Line, for a Spline Leader. Is this not what you want to be able to do?
     
    Charliep, Sep 24, 2004
    #5
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.