[Search tip detail and code files using keywords, tip number, author name, etc ]
    For tip to function correctly, you must ensure that the downloaded file name matches the file name
    displayed in the Rename File To field. Please rename downloaded files when necessary.
Polyline Diet
Tip# 3352 By Kent Cooper On 22-Feb-2010
Rated By 1 users Downloaded : 4815
Categories : Linear Objects
Software type : AutoCAD 2010
Rename File To : PLDiet.lsp
Weed out vertices from polylines.

Updated in September 2013. It has come to the author’s attention that the routine fails if there are coincident vertices at the beginning of a polyline. The new file accounts for that possibility.

Kent Cooper, with help from others, put together a fairly complex LISP routine used for weeding vertices from polylines. Only the code is complex, however — using this routine is a breeze. Load the LISP file and start the command by entering PLD at the command line. The routine works by eliminating extra polyline vertices based on the distance and angle between them. Extra vertices on collinear segments are deleted regardless of distance, and you have the choice of whether or not to straighten arc segments. Note that this routine only works on "LWpolyline" entities. Cadalyst tips "WEED" and "WEED2" work on the older "heavy" polylines.  Nice job with good comments, and credit is given to others who helped with this code.


Average Rating:

User comments
Comment by Widner,Matt
Posted on 2015-07-28 17:24:47
Not sure what change I need to make but I am getting "Error: no function definition: VLAX-CURVE-GETSTARTPOINT".

Log In