Lisp for p-line length

Discussion in 'AutoCAD' started by DavidM, Apr 24, 2007.

  1. DavidM

    DavidM Guest

    Hi all - I have been searching for a LISP that might do what I want, but can
    not really find anything readymade that will do it. What I'm chasing is a
    way of drawing a p-line such that it will limit it's total length to x
    units. Such that running the lisp will ask me "How many units?:" to which I
    enter, say, 400, and then it lets me start drawing the p-line a segment at a
    time until I get up to 400 units total length whereby it constrains the last
    segment to end at only points that would ensure a maximum length of 400
    units...

    So, has anyone seen a Lisp that will do this, or if it is an easy program to
    write is anyone able to help me out with the few lines of code?

    TIA
    David M
     
    DavidM, Apr 24, 2007
    #1
  2. Post it if you find one. I could use something like that for lots of
    fire/life-safety related applications.
     
    Michael Bulatovich, Apr 24, 2007
    #2
  3. BTW, now I draw the line and either LIST it or use MEASURE to find a
    distance along it.
     
    Michael Bulatovich, Apr 24, 2007
    #3
  4. DavidM

    DavidM Guest

    Interesting. As an architect, I can appreciate that. My application was for
    pedestrian walking distances. without this lisp, I print out my drawing and
    use a piece of string. Frustrating...

    Cheers
    David M
     
    DavidM, Apr 24, 2007
    #4
  5. See my other post about what I do now. I could write this routine myself,
    but it's hockey tryout season right now....everything else takes a back
    seat.

    Maybe in May. We could correspond on the kind of functionality required.
     
    Michael Bulatovich, Apr 24, 2007
    #5
  6. DavidM

    Bill Gilliss Guest

    Until that lisp shows up, how about using LENGTHEN > TOTAL? Draw the
    pline where you want it to go, and then another 100 units or so. Then
    use LENGTHEN > TOTAL to trim it to the desired total length. Not exactly
    what you were asking for, but better than string...

    ==========
     
    Bill Gilliss, Apr 24, 2007
    #6
  7. True, but almost anything's better than string ; )
     
    Michael Bulatovich, Apr 24, 2007
    #7
  8. DavidM

    The Jester Guest

    Erm ... I don't know if this is any help (and I know sh*t about LISP, but am
    starting to learn VBA as we speak), but you could also trim to a circle with
    the radius equal to the length of the last segment. That way it doesn't
    matter what direction the user chooses to go with the pline.

    Just my 2 cents.

    Rob
     
    The Jester, Apr 25, 2007
    #8
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.