Homeโ€บ Blogโ€บ CIN LISP: Erase Entities Inside a Polyline Boundary Free Download
๐Ÿ“ LISP

CIN LISP: Erase Entities Inside a Polyline Boundary Free Download

๐Ÿงฎ 1  |  ๐ŸŸข 1
29 Jun 2026 Trishunya Team
CIN LISP: Erase Entities Inside a Polyline Boundary Free Download
๐Ÿ“ LISP · CAD UTILITIES

CIN LISP: Erase Entities Inside a Polyline Boundary (Free AutoLISP Download)

๐Ÿ“… 29 Jun 2026 ๐Ÿท๏ธ CAD BGBgol Global
CIN AutoLISP routine, Erase Entities Inside a Polyline Boundary, shown inside a CAD window

CIN ("Clear Inside") erases every entity located *inside* a selected closed polyline boundary, for example, clearing survey points or text that fall inside a building footprint before further processing. It is the companion tool (and exact inverse) of KEEPIN-bgol (KIN), which erases everything *outside* a boundary instead.

CLRIN-bgol (Erase Entities Inside a Polyline Boundary)

CATEGORY
Utility Lisps
COMMAND NAME
CIN
LISP FILE
CLRIN-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 boundary-based selective erase utilities used in CAD 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

CIN ("Clear Inside") erases every entity located *inside* a selected closed polyline boundary, for example, clearing survey points or text that fall inside a building footprint before further processing. It is the companion tool (and exact inverse) of KEEPIN-bgol (KIN), which erases everything *outside* a boundary instead.

How to Use

  1. Load CLRIN-bgol.lsp into your CAD session (drag-and-drop the file onto the drawing window, or use the APPLOAD command).
  2. Type CIN at the command line and press Enter.
  3. At the Select boundary polygon: prompt, click the closed polyline that defines the area you want cleared.
  4. The routine tests every other entity in the drawing against that boundary and erases anything whose reference point falls inside it. The boundary polyline itself is left untouched.

Why Use It

  • Efficiency, automates erasing entities inside a boundary, saving time versus manually selecting and deleting each one individually.
  • Accuracy, uses the exact defined polygon boundary (even if irregular/complex) to precisely determine which entities to erase, no guesswork with crossing/window selection.
  • Streamlined Workflow, simplifies drawing cleanup tasks that would otherwise require careful manual selection to avoid deleting entities outside the intended boundary.

Where to Use It

  • Clearing survey point data (elevation text, coordinate markers) that falls inside building footprints or structures, where such points are not relevant to represent.
  • Cleaning up drawing areas inside a defined boundary before inserting new content (e.g., a building plan, a table, or other detail).
  • Any drawing cleanup task where entities within a specific (possibly irregular) boundary need to be removed without disturbing content outside it.

Notes

  • Entity "location" is approximated using its primary insertion/start point (DXF group 10). Very large or oddly-shaped entities are tested by that single reference point, not their full extents.
  • Uses a standard ray-casting point-in-polygon algorithm against the boundary's vertex list, correctly handling irregular (non-rectangular) boundaries.
  • See also the companion tool KEEPIN-bgol (KIN), which performs the opposite operation, erasing entities *outside* a boundary instead.
  • 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 CIN work on?

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

Entity "location" is approximated using its primary insertion/start point (DXF group 10). Very large or oddly-shaped entities are tested by that single reference point, not their full extents.

What is the main benefit of using CIN?

Efficiency, automates erasing entities inside a boundary, saving time versus manually selecting and deleting each one individually.

Is CIN free to use for commercial projects?

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

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