Homeโ€บ Blogโ€บ SHPX LISP: Export Drawing Entities as Shapefile-Style Data Free Download
๐Ÿ“ LISP

SHPX LISP: Export Drawing Entities as Shapefile-Style Data Free Download

๐Ÿงฎ 2  |  ๐ŸŸข 2
26 Jul 2026 Trishunya Team
SHPX LISP: Export Drawing Entities as Shapefile-Style Data Free Download
๐Ÿ“ LISP · CAD UTILITIES

SHPX LISP: Export Drawing Entities as Shapefile-Style Data (Free AutoLISP Download)

๐Ÿ“… 26 Jul 2026 ๐Ÿท๏ธ CAD BGBgol Global
SHPX AutoLISP routine, Export Drawing Entities as Shapefile-Style Data, shown inside a CAD window

SHPX is a CAD-native, in-drawing equivalent of a DWG-to-Shapefile export workflow. Since plain AutoLISP cannot write true binary .shp/.shx/ .dbf files (that requires a dedicated GIS library), SHPX instead selects TEXT and LWPOLYLINE entities and writes a structured CSV export, one row per entity, with WKT-style geometry (POINT(...), LINESTRING(...), POLYGON(...)), UTM zone/hemisphere, and (for text) its caption as an attribute value, ready for a GIS import step or a scripting tool to convert into a true shapefile.

SHPEXPORT-bgol (Export Drawing Entities as Shapefile-Style Data)

CATEGORY
Utility Programs
COMMAND NAME
SHPX
LISP FILE
SHPEXPORT-bgol.lsp
LICENSE
Open-source, free

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 CAD-to-GIS (DWG/DXF to Shapefile) export utilities used in survey and GIS workflows. 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

SHPX is a CAD-native, in-drawing equivalent of a DWG-to-Shapefile export workflow. Since plain AutoLISP cannot write true binary .shp/.shx/ .dbf files (that requires a dedicated GIS library), SHPX instead selects TEXT and LWPOLYLINE entities and writes a structured CSV export, one row per entity, with WKT-style geometry (POINT(...), LINESTRING(...), POLYGON(...)), UTM zone/hemisphere, and (for text) its caption as an attribute value, ready for a GIS import step or a scripting tool to convert into a true shapefile.

How to Use

  1. Load SHPEXPORT-bgol.lsp into your CAD session (drag-and-drop the file onto the drawing window, or use the APPLOAD command).
  2. Type SHPX at the command line and press Enter.
  3. Select the TEXT and/or LWPOLYLINE entities you want to export (parcel boundaries, point labels, network lines, etc.).
  4. Enter the UTM zone number when prompted (defaults to 43).
  5. Choose the hemisphere: North or South.
  6. Pick the output CSV file location.
  7. Each selected entity is written as one row, entity type, WKT-style geometry, UTM zone/hemisphere, and attribute (text caption, where applicable). A small green marker circle is also placed on layer BGOL-SHPX at each exported entity's key point, so you can visually confirm what was included.

Why Use It

  • GIS interoperability, bridges CAD drafting and GIS analysis/mapping tools by producing structured, easily-importable geometry + attribute data.
  • UTM-aware, explicitly captures the UTM zone/hemisphere your data is in, avoiding coordinate misalignment when the file is imported into a GIS package.
  • No external installer, runs entirely inside your CAD session as a plain AutoLISP routine, no separate application required.

Where to Use It

  • Exporting parcel/property boundary polygons and point labels from a CAD land survey drawing for use in ArcGIS, QGIS, or similar GIS software.
  • Converting CAD-drafted text, polygon, or polyline geometry into a GIS-friendly intermediate format for spatial analysis or web mapping.
  • Any survey/civil engineering workflow needing to hand off CAD-drafted geometry into a GIS pipeline without a dedicated conversion application.

Notes

  • Output is a structured CSV with WKT-style geometry strings, not a true binary .shp file, this is by design, since standard AutoLISP has no binary shapefile writer. Most GIS tools (QGIS, ArcGIS, GDAL/ogr2ogr) can import WKT-in-CSV directly or via a short conversion script.
  • Closed LWPOLYLINEs (with the closed flag set) are written as POLYGON(...); open ones as LINESTRING(...).
  • TEXT entities are written as POINT(...) geometry with their string content carried as the attribute value.
  • 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

What CAD platforms does SHPX work on?

SHPX is a standard AutoLISP routine, so it runs in AutoCAD, BricsCAD, ZWCAD, and most other AutoLISP-compatible CAD platforms without modification.

What should I know before using SHPX?

Output is a structured CSV with WKT-style geometry strings, not a true binary .shp file, this is by design, since standard AutoLISP has no binary shapefile writer. Most GIS tools (QGIS, ArcGIS, GDAL/ogr2ogr) can import WKT-in-CSV directly or via a short conversion script.

What is the main benefit of using SHPX?

GIS interoperability, bridges CAD drafting and GIS analysis/mapping tools by producing structured, easily-importable geometry + attribute data.

Is SHPX free to use for commercial projects?

Yes. SHPX is fully open-source and free to use, modify, and redistribute for both personal and commercial work, developed and shared by the BGol Community.

How do I load the SHPX command into my drawing?

Drag and drop SHPEXPORT-bgol.lsp onto your open drawing window, or load it through the APPLOAD command, then type SHPX 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.

Back to all articles