BLOCKLOCATE answers “where are all the manholes?” on a drawing too big to see at once. Name a block, or pick one, and every insertion of it is found and shown.
What BlockLocate does
Three ways to look at the answer. Rays draws temporary lines from a point you pick out to every insertion, so the whole spread is visible in one glance. Step zooms to each insertion in turn, pressing Enter to advance. List gives a coordinate table on the text screen.
None of them change the drawing. The rays are temporary vectors that clear on the next redraw, and stepping only moves the view.
Why not just QSELECT? It will select them, which tells you how many and puts grips on them — but on a site plan a mile across, grips you cannot see are no help. This is about finding out where they are.
How to use it
- Load the routine with
APPLOAD, or put it on your support file search path. - Type
BLOCKLOCATE. - Name the block, or pick one on screen.
- Choose Rays, Step or List.
- For Rays, pick the point they radiate from — somewhere you can see.
How it works
Telling an xref from a block takes two tests, and either one alone lets something through. Both are INSERT entities as far as the drawing database is concerned.
An xref’s block table record carries a path in group 1, and a nested xref’s name contains a pipe character. The routine checks both, because a nested xref has no path of its own and a top-level one has no pipe.
Anonymous blocks are excluded too — hatch patterns, dimensions and dynamic block variants, all named *U or *D followed by a number. They are not things anyone goes looking for, and a list full of them buries the answer.
Notes and limits
- Nothing is modified, so there is no undo group. The rays are temporary vectors, not objects.
- Rays clear on the next redraw. That is intended — they are a look, not a drawing.
- Xrefs and anonymous blocks are excluded deliberately.
- Step moves the view only. Nothing is selected or changed.
Download and details
| Name | BlockLocate — find and show every insertion of a block |
| Download | BlockLocate.lsp — 9.9 KB, plain AutoLISP source. Downloads directly; no zip to unpack. |
| Type | AutoCAD AutoLISP routine |
| Command | BLOCKLOCATE |
| Requires | nothing beyond a CAD platform with AutoLISP. |
| Source size | 9.9 KB, 232 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
- BLOCKTALLY LISP — how many there are, as a schedule
- DEEPCOUNT LISP — counting that follows nesting
- STRAYHUNT LISP — finding objects at absurd coordinates
- More free AutoLISP routines on this site
- Wisey’s Steel Shapes — free structural steel section drawing program