PCSV LISP: Export Polyline Coordinates to CSV (Free AutoLISP Download)
PCSV is a straightforward vertex-to-CSV export routine: select any polyline and export the X (Easting), Y (Northing), and Z (Elevation) coordinates of every vertex to a Comma Separated Values file, along with a sequential point number.
PLCSVOUT-bgol (Export Polyline Coordinates to CSV)
Command Type: AutoLISP routine (works in AutoCAD, BricsCAD, ZWCAD and most AutoLISP-compatible CAD platforms)
Developed by: BGol Community, bgol.in
Inspired by the general concept of vertex-to-CSV export utilities used in CAD/survey drafting. This is an original, independently written routine, new file name, new command name, new source code, created so the CAD community has a free, editable, open-source alternative.
Overview
PCSV is a straightforward vertex-to-CSV export routine: select any polyline and export the X (Easting), Y (Northing), and Z (Elevation) coordinates of every vertex to a Comma Separated Values file, along with a sequential point number.
How to Use
- Load
PLCSVOUT-bgol.lspinto your CAD session (drag-and-drop the file onto the drawing window, or use theAPPLOADcommand). - Type
PCSVat the command line and press Enter. - Select the polyline whose vertices you want to export.
- Choose a location and file name for the
.csvoutput (defaults topntlist.csv). - A CSV file with a header row and one data row per vertex, point number, Easting, Northing, Elevation, is written to disk.
Why Use It
- Fast, direct export, no manual reading and typing of each vertex from Properties or the
LISTcommand. - Spreadsheet-ready, CSV output opens immediately in Excel or any spreadsheet tool, or feeds into other survey/GIS software.
- Simple and general, useful when a full-featured export tool with auto-numbering or chainage isn't necessary; just the raw coordinates.
Where to Use It
- Extracting Easting/Northing/Elevation data from any alignment or boundary polyline for use in a spreadsheet, report, or other software.
- Quick coordinate export tasks that don't need on-drawing vertex numbering.
- General-purpose CAD-to-spreadsheet coordinate handoff for survey or design polylines.
Notes
- Works on LWPOLYLINE entities. LWPOLYLINEs store a single Elevation property (not per-vertex Z), so every row shares that one elevation value, this matches how LWPOLYLINE geometry is actually stored.
- The CSV includes a header row (
PointNo,Easting,Northing,Elevation) for easy import into spreadsheet tools. - No new drawing entities are created, this is a read-only export.
- Source code is fully open, feel free to study, modify, and redistribute it under the same open, free-for-all spirit.
Credits
Developed and shared for the CAD community by BGol Community. Website: https://bgol.in/ Free and open-source, use it, modify it, share it, for personal or commercial work alike.
Frequently Asked Questions
PCSV is a standard AutoLISP routine, so it runs in AutoCAD, BricsCAD, ZWCAD, and most other AutoLISP-compatible CAD platforms without modification.
Works on LWPOLYLINE entities. LWPOLYLINEs store a single Elevation property (not per-vertex Z), so every row shares that one elevation value, this matches how LWPOLYLINE geometry is actually stored.
Fast, direct export, no manual reading and typing of each vertex from Properties or the LIST command.
Yes. PCSV is fully open-source and free to use, modify, and redistribute for both personal and commercial work, developed and shared by the BGol Community.
Drag and drop PLCSVOUT-bgol.lsp onto your open drawing window, or load it through the APPLOAD command, then type PCSV at the command line to run it.
๐ค About BGol Community
BGol Community of Advanced Surveying builds and shares free, open-source tools for the survey and CAD drafting community.
๐ Made with โค๏ธ by BGol Community of Advanced Surveying
Free, open-source, and built for the CAD community, for personal or commercial use, always.