locate a point on pline

Discussion in 'AutoCAD' started by jian zheng, Feb 7, 2005.

  1. jian zheng

    jian zheng Guest

    I am working on a lisp function which will caculate the individual area of a
    bunch of closed plines and write a piece of text(the actual area) for each
    of them. Now the question is how do I determine where to put the texts? Is
    there any lisp function I can use to find a point on a polyline? I think any
    poin is fine as long as it is one of the points on that pline. I am dealing
    with plines with more than a hundred points here.

    thanks a lot

    Jian
     
    jian zheng, Feb 7, 2005
    #1
  2. jian zheng

    Jeff Mishler Guest

    Look at the (vlax-curve-*) functions, they will allow you to locate a point
    anywhere on the pline. For instance, to find the midpoint use this:
    (setq middle (vlax-curve-getpointatdist pline (/ (vlax-curve-getdistatparam
    pline (vlax-curve-getendparam pline)) 2.0)))
     
    Jeff Mishler, Feb 7, 2005
    #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.