reverse polyline direction

Discussion in 'AutoCAD' started by Mark McDonough, Nov 18, 2004.

  1. I have found a few lisp utilities to reverse the direction of a polyline,
    but they don't work very well. Does anyone know of a routine that actually
    works well?
     
    Mark McDonough, Nov 18, 2004
    #1
  2. nevermind... I found a good one... PLREV.LSP from Mr. Turvill's site.
    Thanks
     
    Mark McDonough, Nov 18, 2004
    #2
  3. Mark McDonough

    Jürg Menzi Guest

    Hi Mark

    Visit my homepage -> Free Stuff and search for 'VxRevPline'...

    Cheers
     
    Jürg Menzi, Nov 18, 2004
    #3
  4. Thanks Juerg, I'll be sure to check it out.
     
    Mark McDonough, Nov 18, 2004
    #4
  5. Mark McDonough

    Jürg Menzi Guest

    Welcome...¦-)

    Cheers
     
    Jürg Menzi, Nov 19, 2004
    #5
  6. Mark McDonough

    Douglas Barr Guest

    Hi Juerg-

    VxRevPline does not work for me... yet.

    I added this for a shortcut in my acad.lsp...

    (defun c:rvp ()
    (vxrevpline (car (entsel)))
    )

    Followed by your entire code...

    (defun VxRevPline (Obj / BlgLst PntLst SegCnt TmpLst Ubound)
    (setq TmpLst (vlax-get Obj 'Coordinates))
    etc...

    I also tried
    (defun c:rvp ()
    (vxrevpline (entsel))
    )

    ....and if I run
    (VxRevPline)
    I'm told an argument is required, yet I want to pick the pline directly.

    What must I do?
    -doug
     
    Douglas Barr, Nov 19, 2004
    #6
  7. Mark McDonough

    Jürg Menzi Guest

    Hi Doug

    Read the header of my Free Stuff page... all functions on this page
    require objects not entities as argument(s).
    Therefore you've to use:
    (VxRevPline (vlax-ename->vla-object (car (entsel))))

    Cheers
     
    Jürg Menzi, Nov 19, 2004
    #7
  8. Mark McDonough

    Douglas Barr Guest

    Thank you!
     
    Douglas Barr, Nov 19, 2004
    #8
  9. Mark McDonough

    Douglas Barr Guest

    by the way....
    Your website's "Free Stuff" page displays with an extra character "=" before each
    heading, forcing an extra line. This makes the description lines mis-align.
    -doug

     
    Douglas Barr, Nov 19, 2004
    #9
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.