Drop a block onto a line and the line runs straight through it. BLOCKNOTCH cuts the line so the block sits in a clean gap — exactly as a valve sits in a pipe run, a door sits in a wall, or a switch symbol sits in a circuit. It rotates the block to match the line at the same time.
What BlockNotch does
Place a symbol on a sloping or curved line and the block turns to follow the line’s direction at that point, automatically, before the gap is cut.
Doing this by hand means BREAK with two carefully snapped points, twice over, plus a ROTATE with a reference angle — for every symbol. This replaces all of it with one pick.
Three commands. BLOCKNOTCH inserts a block, rotates it to the line and cuts the gap. NOTCHBLOCK cuts the gap around an existing block, repeatedly. NOTCHALL cuts the gap around every block in a selection — which is how you fix a drawing where the symbols were all placed first.
Arcs, ellipses, circles, lines, xlines, splines, polylines and lightweight polylines are trimmed. Anything else near the block is left alone.
How to use it
- Load the routine with
APPLOAD, or put it on your support file search path. - Type
BLOCKNOTCHto place a new symbol,NOTCHBLOCKfor one already placed, orNOTCHALLfor a whole selection. - Pick the insertion point on the line, or select the existing blocks.
- Type
Rat any selection prompt to toggle automatic rotation. The setting is shared by all three commands and survives between sessions.
How it works
1. The bounding box. The block’s true extents are measured by walking its definition and unioning the bounding boxes of the geometry inside. Text, MText and attribute definitions are deliberately excluded — a long label would otherwise inflate the box and gouge a gap far wider than the symbol. Objects on frozen layers and invisible objects are excluded for the same reason. Nested blocks are measured recursively.
Measuring the definition rather than calling GetBoundingBox on the reference matters: AutoCAD’s own bounding box for a dynamic block is frequently wrong, reporting the extents of the unmodified definition rather than the current state.
2. The rotation. Every curve near the block is tested and the one passing closest to the insertion point wins — but only if it passes within a ten-thousandth of a unit, so a block merely near a line is left alone rather than snapping to it. The curve’s first derivative at that point gives the tangent direction, which becomes the block’s rotation. The angle is then flipped if necessary so the block never ends up upside-down.
3. The cut. A temporary closed polyline is drawn around the block’s outline. Every nearby curve is intersected with it, the two intersection points furthest apart are found, and BREAK removes the span between them. The temporary polyline is then deleted.
Taking the furthest-apart pair is what makes this robust. A line crossing the box produces two intersections and either pair works — but a line crossing a re-entrant or rotated outline can produce four, and breaking between the wrong pair would leave a fragment inside the block or cut away far too much.
Notes and limits
- The gap is rectangular and aligned to the block. A round symbol therefore gets a square gap. That is normal for schematic work, but it is worth knowing before you use it on something where it would show.
- Rotation only happens within a ten-thousandth of a unit of a curve. A block placed near but not on a line keeps its rotation.
- Automatic rotation is a shared, persistent setting. Toggle it with
Rat any of the three commands’ prompts; the change applies to all of them and survives restarts. - Only the listed curve types are trimmed. Hatches, text and other blocks near the symbol are untouched.
Download and details
| Name | BlockNotch — trim geometry to a block outline automatically |
| Download | BlockNotch.lsp — 39.6 KB, plain AutoLISP source. Downloads directly; no zip to unpack. |
| Type | AutoCAD AutoLISP routine |
| Commands | BLOCKNOTCH, NOTCHALL, NOTCHBLOCK |
| Requires | the ActiveX layer (loaded automatically by the routine with vl-load-com). |
| Source size | 39.6 KB, 927 lines |
| Error handling | Yes — a *error* handler restores every system variable it changed, on cancel as well as on error. |
| Undo | Not needed — this routine only reads the drawing and changes nothing. |
| Compatibility | AutoCAD (any release with AutoLISP), BricsCAD, ZWCAD, GstarCAD, ProgeCAD and other IntelliCAD-based platforms. AutoCAD LT needs a LISP enabler. No .NET, no ObjectARX, no installer. |
| Author | YZ, August 2026 |
| Licence | Free to use, supplied “as is” with no warranty. |
References
- BLOCKABSORB LISP — add geometry into a block definition in place
- BASESNAP LISP — get the block’s base point where it needs to be first
- More free AutoLISP routines on this site
- Wisey’s Steel Shapes — free structural steel section drawing program