RINGCLEAR – Erase Everything Between Two Boundaries (Free AutoCAD LISP)

15th September 2026

FREE AUTOCAD LISP

RINGCLEAR — empty the ring between two closed shapes, cut at the edge

Pick an outer closed shape, pick an inner one, and everything trapped between the two is gone. What lies outside the outer shape and what lies inside the inner one stays exactly as it was. Clearing a margin around a detail, emptying a corridor along a route, punching a clean frame into a busy plan — all of it in one command, instead of twenty minutes of trimming and erasing by hand.

The whole point is the edge. Anything crossing a boundary is cut exactly at it rather than deleted whole — a pipe run that passes straight through keeps its outside part and its inside part and loses only the middle. Lines, polylines with arc segments, circles, ellipses and splines all trim cleanly, and both boundaries survive untouched.

Text, blocks, hatches and dimensions are the exception, because AutoCAD cannot cut them at all. There RINGCLEAR uses the only honest rule left: the object’s centre. Centre in the ring and the whole object goes; centre outside it and the whole object stays, overhang and all. The demo shows both cases happening side by side.

RINGCLEAR free AutoCAD LISP erasing everything between two closed boundaries and trimming what crosses them

How to use it

  1. Unzip, then load the .lsp with APPLOAD.
  2. Make sure Express Tools is installed – the cutting is done through its ETRIM command.
  3. Type RINGCLEAR.
  4. Pick the OUTER boundary, then the INNER one. Any closed curve works: a polyline with arcs, a circle, an ellipse, a closed spline.
  5. If the routine cannot work out a point between the two on its own, it asks you to pick one.
  6. The ring comes out empty. Don’t like the result? One U puts the whole drawing back.

Good to know

Boundaries Any two closed curves – polyline with arc segments, circle, ellipse or closed spline. The inner one must lie completely inside the outer one; RINGCLEAR checks and stops if it doesn’t
Keeps Everything outside the outer boundary, everything inside the inner one, and both boundaries themselves
Trims Lines, polylines, arcs, circles, ellipses and splines are cut exactly where they cross a boundary
Text, blocks, hatches, dimensions Nothing AutoCAD can trim: erased when the object’s centre falls in the ring, kept whole otherwise
Leaves no mess Locked layers are unlocked for the run and locked again afterwards, and every system variable the routine touches is restored on every exit – including Esc
Undo The whole operation is a single undo step – one U reverses it
Needs Express Tools installed, and model space. Thaw and turn on any layer you want processed
Command RINGCLEAR

From the same workshop — watch what the paid add-ons do

Divide Area for AutoCAD - product boxDivide Area add-on slicing an AutoCAD shape into equal strips

Divide Area
Split any closed shape into pieces of equal area – by number, by distance, a set area or a free cut.

See Divide Area$21.90

Area Measure for AutoCAD - product boxArea Measure add-on numbering AutoCAD polygons and inserting a totalled area table

Area Measure
Measure closed shapes in any unit, number them, and get a totalled area table – annotative text supported.

See Area Measure$21.90

PlotData for AutoCAD - product boxPlotData numbering parcel corners in AutoCAD and inserting the coordinate table

PlotData
Number every parcel corner, label every side length and azimuth, and insert the coordinate table – one selection.

See PlotData$19.90

Voronoi Generator for AutoCAD - product boxVoronoi Generator filling a closed AutoCAD polyline with organic cells

Voronoi Generator
Fill any closed polyline with Voronoi cells – exact spacing, edge distance and rounding, live preview.

See Voronoi Generator$24.90

AUTODIM for AutoCAD - product box
Automatic Dimension — AutoCAD Add-in
AUTODIM
Length on every line, polyline and arc you select – as a real dimension or as text, with the layer name above it. Break at turns, at crossings, or total a whole object including its bends.

See AUTODIM$29

Contour Generator turning Google Earth ground into survey contour lines, a 3D terrain model and a printed contour sheet
WEB TOOL — NOTHING TO INSTALL
KIM Contour Generator
Draw a field in your browser, or import a KML from Google Earth, and get survey contours in a minute — scaled PDF, DXF in real UTM, plus STEP and STL of the terrain.

See Contour Generator$60

This tool is part of our free AutoCAD LISP collection — 20+ routines, all free, all tested on real projects.