Leader vertex

Discussion in 'AutoCAD' started by André Dantas Rocha, Feb 18, 2004.

  1. Hi

    How can I modify a specific vertex (ex. 2nd) in a leader via autolisp?

    Thanks

    André
     
    André Dantas Rocha, Feb 18, 2004
    #1
  2. Here's a snippet from a routine I use:

    (setq le (entget lname)
    vtxlist '()
    )
    (if le
    (progn
    ;; get the vertex points
    (foreach x le
    (if (= (car x) 10) ; a leader line vertex point
    (setq vtxlist (cons x vtxlist))
    )
    )

    (if (> (setq vlen (length vtxlist)) 1)
    (progn
    (setq
    oep (car vtxlist) ; old end point field in the form (10 xxx.xx yyy.yy
    zzz.zz)
    okp (cadr vtxlist) ; old knee point field in the form (10 xxx.xx yyy.yy
    zzz.zz)
    )
    nkp ;;;;insert or adjust coordinates of okp here;;;;;;;;
    le (subst (cons 10 nkp) okp le) ; replace the old knee point with the
    new point
    )
    (entmod le) ; rewrite it to the drawing
    )
    )
     
    Allen Johnson, Feb 18, 2004
    #2
  3. Thanks Allen!
     
    André Dantas Rocha, Feb 18, 2004
    #3
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.