[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.
Export Point Coordinates
Tip# ALSP1202 By Tony Hotchkiss On 01-Dec-2002
3
Rated By 1 users Downloaded : 15965
Categories : Points
Software type : AutoCAD
Rename File To : PLIST.LSP
Plist.lsp uses ActiveX to extract x,y,z coordinates from points and polylines and list them in a comma-delimited text file you can open in Excel.

Pedro Gerstberger e-mailed a request to export x,y,z points from either polylines or AutoCAD point entities. The AutoLISP solution plist.lsp lets you select lightweight polylines, 2D polylines, or point objects, then makes a comma-delimited text file suitable for opening in Microsoft Excel.

plist.lsp lists the points grouped in this order: lightweight polylines, 2D polylines, and point objects. Figure 1 shows an AutoCAD drawing with an assortment of polyline types and some point entities. Figure 2 shows a Microsoft Excel worksheet that displays the x,y,z locations of points selected from the drawing in Figure 1.
I wrote an AutoLISP Solution more than two years ago (Cadalyst, July 2000) that extracted the vertex points from polylines. That program, vertext.lsp, was suitable for early versions of AutoCAD. This month's solution is an update that includes polylines and point entities and uses the more modern approach of object-oriented programming with ActiveX objects, methods, and properties.


 

 

Average Rating:
3


User comments