MEP Block Counter (MEPCOUNT)
eplisp, the free multilingual LISP library
| Openly licensed; the original file is hosted here together with its license. | |
… Rate this tool: | |
| Commands | MEPCOUNT |
|---|---|
| Category | Block Tools |
| Author | Mohamed Suhail (BuildMEP) |
| Source | suhail1987/buildmep-autocad-lisp |
| License | MIT |
| Requirements | AutoCAD (full version; not LT); should also work in BricsCAD, GstarCAD and ZWCAD with Visual LISP ActiveX support. |
| Prompt language | English |
| Files | MEPCOUNT.lsp (10 KB) |
| Added | 2026-10-26 |
| Download the original fileSource repository | |
Counts blocks by name or by name and layer, skips xrefs and anonymous blocks, and can place the result as an AutoCAD table or save it as CSV.
MEPCOUNT from BuildMEP is a block counter for quantity takeoffs in mechanical, electrical and plumbing drawings: sprinklers, diffusers, light fittings, sockets, valves and similar symbols.
Overview
You select blocks, or press Enter to count all blocks in the current space (model space or the active layout). Dynamic blocks are counted under their real name, xrefs are skipped, and AutoCAD's internal anonymous blocks are left out and reported as a separate number. The count can be grouped by block name only, or by block name and layer, which separates for example the same fixture on different circuit or floor layers.
The sorted list with a total always appears on the command line. Optionally the routine inserts an AutoCAD TABLE with the same data at a picked point, using the current TEXTSIZE, and saves a CSV file for Excel or a bill of quantities; the suggested name is the drawing name followed by -block-count.csv.
How to use it
- Load MEPCOUNT.lsp with APPLOAD.
- Type MEPCOUNT and press Enter.
- Select the blocks to count, or press Enter to count all blocks in the current space.
- Choose Name or Layer grouping (Name is the default).
- Answer Yes to place a table and pick its top-left corner, or No.
- Answer Yes to export a CSV and choose the file name, or No.
Notes and limitations
- Only top-level references are counted; blocks nested inside other blocks are not opened.
- Pressing Enter counts the current space only, not other layouts.
- The table is placed on the current layer with the current table style; it is a static result and does not update.
- A CSV file is written only when you confirm and choose a path; an existing file with the same name is overwritten.
- The repository was published in 2026; test on a copy of the drawing first.
Source and license
This tool is not made by eplisp. The file is published unchanged under its author's license; copyright stays with the author.
- MEPCOUNT.lsp (10 KB)
- License text
References
- Source repository: suhail1987/buildmep-autocad-lisp – https://github.com/suhail1987/buildmep-autocad-lisp/tree/ef6583b8166584d302de92c7faf2d6b5cbc2d605
- Author: Mohamed Suhail (BuildMEP) – https://github.com/suhail1987
- License: MIT – https://github.com/suhail1987/buildmep-autocad-lisp/blob/ef6583b8166584d302de92c7faf2d6b5cbc2d605/LICENSE
Found a mistake, or are you the author of this tool? Request a correction or removal