eplisp

AutoCAD Fence Break LISP: Break Lines at Fence Crossings

Splits every line your fence crosses at the crossing point, without leaving a gap.

Commands: FENCEBREAK

Load the downloaded .lsp file with the APPLOAD command in AutoCAD or GstarCAD, then type the command name. How to load a LISP file

Download all tools in one file (138 KB)

This AutoCAD fence break LISP adds the FENCEBREAK command. You draw a fence, and every LINE object the fence crosses is split into two at the crossing point. Nothing is deleted and no gap is left; each line just becomes two pieces that meet at that point.

The fence can have several segments and may cross the same line more than once. Each crossing gets its own break, and the tool keeps track of the pieces created by earlier breaks. When it finishes, the command line reports how many breaks were made.

In AutoCAD you can split a single object at one point with BREAK by giving the same point twice, or with BREAKATPOINT in recent releases, but both work on one object at a time. FENCEBREAK splits dozens of lines with a single fence.

How to use it

  1. Load fencebreak.lsp with APPLOAD and type FENCEBREAK.
  2. Make sure the lines you want to split are visible on screen.
  3. Pick the first point of the fence and the following points; use Undo to drop the last one if needed.
  4. Press Enter to finish the fence; every crossed line is split at the crossing point.

Notes and tips

  • It splits LINE objects only; polylines, arcs, circles and splines are left alone.
  • Selection uses a fence, so lines outside the current view may be missed. Zoom so the area is on screen first.
  • Where the fence touches a line exactly at its endpoint, no break is made.
  • The whole operation is one undo step, so a single U reverses it.

Frequently asked questions

How do I break many lines at the same place in AutoCAD?

Run FENCEBREAK and draw a fence through the spot where you want the breaks. Every LINE the fence crosses is split at the crossing point.

Does FENCEBREAK remove part of the line?

No. Lines are only split at the crossing point, with no gap. To remove the segment between two cutting lines, use the BRKBETWEEN tool instead.

Does it work on polylines?

No, it works on LINE objects only. Explode polylines into lines first if you need to split them this way.