Homeโ€บ Blogโ€บ PQC LISP: Quality-Check Closed Polygons Free Download
๐Ÿ“ LISP

PQC LISP: Quality-Check Closed Polygons Free Download

๐Ÿงฎ 2  |  ๐ŸŸข 2
08 Apr 2026 Trishunya Team
PQC LISP: Quality-Check Closed Polygons Free Download
๐Ÿ“ LISP · CAD UTILITIES

PQC LISP: Quality-Check Closed Polygons (Free AutoLISP Download)

๐Ÿ“… 08 Apr 2026 ๐Ÿท๏ธ CAD BGBgol Global
PQC AutoLISP routine, Quality-Check Closed Polygons, shown inside a CAD window

PQC is a dedicated pre-GIS-export QA check. A polygon in AutoCAD can look mathematically closed (start and end points coincide) while its actual Closed property is still set to No, meaning GIS software may treat it as invalid, open geometry. AutoCAD's native overlap-checking tools don't test for this specific issue; PQC does, and reports the total area of everything that's genuinely closed.

POLYQC-bgol (Quality-Check Closed Polygons)

CATEGORY
Polyline Lisps
COMMAND NAME
PQC
LISP FILE
POLYQC-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 closed-polygon QA utilities used in CAD-to-GIS 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

PQC is a dedicated pre-GIS-export QA check. A polygon in AutoCAD can look mathematically closed (start and end points coincide) while its actual Closed property is still set to No, meaning GIS software may treat it as invalid, open geometry. AutoCAD's native overlap-checking tools don't test for this specific issue; PQC does, and reports the total area of everything that's genuinely closed.

How to Use

  1. Load POLYQC-bgol.lsp into your CAD session (drag-and-drop the file onto the drawing window, or use the APPLOAD command).
  2. Type PQC at the command line and press Enter.
  3. Select one or more polyline entities intended to represent polygons.
  4. Each polyline's true DXF Closed flag is checked (not just visual appearance). A small marker circle is placed at each polyline's first vertex on layer BGOL-PQC, green for genuinely closed, red for not.
  5. The command line reports how many were checked, how many are truly closed, and the total area of the closed objects.
  6. A CSV report (BGOL-PQC-AreaTable.csv, saved next to the current drawing) lists each polyline's handle, closed status, and area.

Why Use It

  • Catches a specific, easy-to-miss data-quality problem, visually closed but property-wise open polylines, that would otherwise cause failures or incorrect topology when importing into a GIS system.
  • Provides a quantifiable check (total area of confirmed-closed objects) as part of the QA process, rather than just a pass/fail flag.
  • CSV export creates a documented record of the QA check, useful for audit trails or team review before committing to a GIS export/import step.
  • Complements (rather than duplicates) AutoCAD's native overlap-detection tools, covering a gap those tools don't address.

Where to Use It

  • Pre-export quality assurance for any CAD-to-GIS workflow where "polygon" is a meaningful, topology-relevant object (land parcels, building footprints, zoning boundaries, etc.).
  • Any drafting QA step needing to programmatically verify closed status across many polylines at once rather than manually checking Properties for each one.
  • Preparing cadastral, land-use, or infrastructure drawings for GIS integration where invalid open polygons would break downstream processing.

Notes

  • Only LWPOLYLINE entities are checked; other entity types in the selection set are ignored.
  • Area is computed only for polylines whose Closed flag is genuinely set; visually-closed-but-flag-open polylines get a red marker and a 0.000 area row in the CSV, flagging them for correction (e.g., re-drawing with PEDIT โ†’ Close).
  • 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 PQC work on?

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

Only LWPOLYLINE entities are checked; other entity types in the selection set are ignored.

What is the main benefit of using PQC?

Catches a specific, easy-to-miss data-quality problem, visually closed but property-wise open polylines, that would otherwise cause failures or incorrect topology when importing into a GIS system.

Is PQC free to use for commercial projects?

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

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