Wanted: AutoLISP routine to snap line vertices to nearest point on apolyline

Discussion in 'AutoCAD' started by Andrew Thelwell, Nov 19, 2007.

  1. Hi,

    I am looking for an AutoLISP routine for use in AutoCAD 2007. The
    routine needs to:

    -- Look through an entire drawing, including inside of block
    definitions
    -- Find all lines on a given layer
    -- Move (snap) the vertices of said line to the nearest vertex of a
    polyline on a different layer

    So, basically, said routine needs to go through an entire drawing,
    including looking inside block definitions... find all lines on a
    layer of a given name, say "GUIDE_LINES"... snap the vertices of
    these lines to the nearest vertex of a polyline on a different layer,
    say "MAIN_SHAPE".

    Basically, the reasoning behind this is that we have some external
    software that we need to feed the resulting DXF... said software needs
    to have the points of our "GUIDE_LINES" layer matched exactly to
    points of the polyline shapes on our "MAIN_SHAPE" layer (those aren't
    the final layer names, but just for example).

    Hope this makes sense. Would be willing to purchase a pre-existing
    tool or pay a sensible fee to anyone willing to provide such a script.

    Pretty urgent, so would appreciate any responses.

    Many thanks in advance!

    Andy
     
    Andrew Thelwell, Nov 19, 2007
    #1
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.