Homeโ€บ Blogโ€บ GAPC LISP: Find Open Polygon / Find Open Polylines Free Download
๐Ÿ“ LISP

GAPC LISP: Find Open Polygon / Find Open Polylines Free Download

๐Ÿงฎ 2  |  ๐ŸŸข 2
29 Mar 2026 Trishunya Team
GAPC LISP: Find Open Polygon / Find Open Polylines Free Download
๐Ÿ“ LISP · CAD UTILITIES

GAPC LISP: Find Open Polygon / Find Open Polylines (Free AutoLISP Download)

๐Ÿ“… 29 Mar 2026 ๐Ÿท๏ธ CAD BGBgol Global
GAPC AutoLISP routine, Find Open Polygon / Find Open Polylines, shown inside a CAD window

GAPC addresses a common AutoCAD quirk: a polyline can visually look closed (its first and last points coincide) while its internal Closed flag is still set to false, meaning it is technically an open polyline. Exporting such "fake closed" polygons to GIS or Land Records systems can cause import failures or incorrect topology. GAPC checks each selected polyline's actual Closed flag and visually marks exactly where any open polyline's gap begins.

GAPCHECK-bgol (Find Open Polygon / Find Open Polylines)

CATEGORY
Polyline Lisps
COMMAND NAME
GAPC
LISP FILE
GAPCHECK-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 open-polygon detection 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

GAPC addresses a common AutoCAD quirk: a polyline can visually look closed (its first and last points coincide) while its internal Closed flag is still set to false, meaning it is technically an open polyline. Exporting such "fake closed" polygons to GIS or Land Records systems can cause import failures or incorrect topology. GAPC checks each selected polyline's actual Closed flag and visually marks exactly where any open polyline's gap begins.

How to Use

  1. Load GAPCHECK-bgol.lsp into your CAD session (drag-and-drop the file onto the drawing window, or use the APPLOAD command).
  2. Type GAPC at the command line and press Enter.
  3. Select the polylines to check.
  4. Press Enter to finish the selection.
  5. Every polyline found to be open (Closed flag not set) is marked with a circle at its start point, on a dedicated layer, BGOL-GAPC (colour red).

Why Use It

  • Targets a specific, easy-to-overlook issue, polygons that appear closed on screen but are not truly closed at the entity level.
  • Visual, not just textual, draws a marker exactly where the problem is, rather than just reporting "this entity is open" in text.
  • Prevents downstream failures, avoids GIS/Land Records import errors that require genuinely closed polygon topology.
  • Fast batch checking, checks many selected polylines in one command run.

Where to Use It

  • Pre-export quality assurance for any CAD-to-GIS or CAD-to-Land-Records workflow, where polygon topology must be genuinely closed.
  • Land parcel, building footprint, or zoning boundary drawings before handoff to a GIS system.
  • Any drafting QA step needing quick, visual identification of improperly closed polygons across a whole drawing or selection.

Notes

  • Checks the actual Closed flag (DXF group 70, bit 1) via entget, not just whether the first and last points visually coincide, this is exactly the distinction that matters for GIS/Land Records import.
  • Marker circle radius defaults to 1.5 drawing units; edit the *bgol-gapc-radius* constant near the top of the .lsp file to change marker size.
  • Works on LWPOLYLINE entities; the selected polylines themselves are never modified, only marked.
  • 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 GAPC work on?

GAPC 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 GAPC?

Checks the actual Closed flag (DXF group 70, bit 1) via entget, not just whether the first and last points visually coincide, this is exactly the distinction that matters for GIS/Land Records import.

What is the main benefit of using GAPC?

Targets a specific, easy-to-overlook issue, polygons that appear closed on screen but are not truly closed at the entity level.

Is GAPC free to use for commercial projects?

Yes. GAPC 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 GAPC command into my drawing?

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