[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.
Convert 3D polylines to 2D polylines
Tip# ALSP0903 By Tony Hotchkiss On 01-Sep-2003
Rated By 2 users Downloaded : 22324
Categories : 3D Editing
Software type : AutoCAD
Rename File To : pline-3d-2d.lsp.
Routine (pline-3d-2d.lsp) uses Visual LISP commands to convert 3D polylines to 2D.

George Anderson of Eugene, Oregon, e-mailed a request to turn 3D polylines into 2D polylines. Several routines he downloaded from the Internet claimed to perform this function, but all failed to set the z coordinate to zero. This month's solution is PLINE-3D-2D.LSP. I sent it to George, and he reports that it works for him. I wrote the code using the version of AutoLISP that comes with AutoCAD 2004, but it should work with 2002 also.

Download the AutoLISP file from www.cadalyst.com (see box above) and save it in the AutoCAD support directory. From the AutoCAD Tools menu, choose Load Applications, or enter Appload at the AutoCAD Command prompt. In the Load/Unload Applications dialog box, select the PLINE-3D-2D.LSP file from the support directory where you installed it, click the Load button, and then click Close. After you load the program, AutoCAD prompts you to type PL32 to start.

After you enter PL32, AutoCAD prompts you to select 3D polylines, shown highlighted in figure 1. Press to complete your selection, at which time the routine converts the polylines to 2D (figure 2). Note that the 2D polylines retain their layer dependence.



Average Rating:

User comments
Comment by Lehmann,michael
Posted on 2008-10-16 20:17:40
It didn't allow me to stop the program, no input always went back to the pick 3d polyline command. I'm using 2008
Comment by Cruz,Dennis
Posted on 2009-05-18 09:49:28
This routine works really well, EXCEPT, if you try using it on a blank drawing. (Why try any routine on a blank drawing? It happens...) If there is nothing to select, you get stuck in the routine and you have to shut down AutoCAD to stop the routine, which will close any drawings you already have opened. Someone please fix this unwanted "feature". thanks.
Comment by Holmberg,Ben
Posted on 2009-06-30 14:39:27
Excellent lisp routine! Be aware that it automatically places the 2D pline at whatever is set for the current elevation. You can change the current elevation with the "ELEVATION" command.
Comment by muppasson,muppas
Posted on 2013-03-19 10:23:33
Thank you very very much. I'm impressed.
Comment by bender,leticia
Posted on 2014-08-28 08:09:06
Why I can't acess the download link? You don't have permission to access /sites/default/files/nodes/2003/1204/tip/ALSP0903.zip on this server.