BATT fills a cavity with the standard batt insulation squiggle — the serpentine loop run used on wall sections, roof build-ups and partition plans to show what is insulated. Pick along one face of the cavity, give the thickness or pick the opposite face, and the run is filled between the two.
What BattInsul does
Note: there are two BATT routines on this site. This one and the older BATT LISP both define a command called BATT, so load one or the other, not both — whichever is loaded second silently replaces the first. They are kept separate rather than merged because they draw the symbol differently and people are used to the one they have.
One closed loop of polyline, not a row of inserted blocks. The centre line runs the length of the cavity alternating between the two faces, with each segment bulged into a half circle, which gives the familiar row of lobes. A second pass back along the run closes it, so the batt reads as a single object that can be selected, moved or erased in one go.
How to use it
- Load the routine with
APPLOAD, or put it on your support file search path. - Type
BATT. - Pick along one face of the cavity.
- Give the thickness, or pick the opposite face.
How it works
A polyline segment carries a bulge: the tangent of a quarter of the arc’s included angle. A bulge of 1 is therefore a half circle, and its sign says which way the arc turns. Alternating the sign segment by segment is what produces the serpentine — that one property is the whole routine.
The lobes are inset slightly from the cavity faces. That gap is deliberate: at plot scale the outer loops would otherwise merge into the wall lines and the whole thing turns into a smudge. The original called it a pen allowance, which is exactly what it is.
Nothing has to be sitting in the current folder. The original could not run without BATT.DWG beside it, and a second file, INPUT.LSP, for one of its input helpers. The geometry is drawn directly and everything needed is in the one file.
Insertion points are passed as values, not by writing to the LASTPOINT system variable and reading it back between calls — which meant any command run in between, or any object snap, moved the batt.
No variable is called T or echo. One helper was written (defun distget (b p d / t), declaring T — the symbol for true — as a local and then assigning to it, so anything called while that function ran saw a broken T.
Notes and limits
- Command name clash. Do not load this alongside the older BATT LISP.
- One closed polyline, so the whole run selects as one object.
- No supporting DWG or LSP is needed.
- One undo group covers the run.
Download and details
| Name | BattInsul — fill a cavity with the batt insulation squiggle |
| Download | BattInsul.lsp — 10.3 KB, plain AutoLISP source. Downloads directly; no zip to unpack. |
| Type | AutoCAD AutoLISP routine |
| Command | BATT |
| Requires | nothing beyond a CAD platform with AutoLISP. |
| Source size | 10.3 KB, 232 lines |
| Error handling | Yes — a *error* handler restores every system variable it changed, on cancel as well as on error. |
| Undo | The whole operation is wrapped in a single undo group, so one U reverses all of it. |
| 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
- BATT LISP — the older routine of the same command name
- WALLSECTION LISP — a wall section that draws its own insulation
- Material hatch patterns — when a hatch suits better than a symbol
- More free AutoLISP routines on this site
- Wisey’s Steel Shapes — free structural steel section drawing program