AutoCAD Block Count LISP: Free MEP Block Counter with Excel Export

Every MEP takeoff has a counting job buried in it: sprinkler heads, supply diffusers, light fittings, smoke detectors, FCUs, valves. AutoCAD can count, but the built-in options either count one block at a time or put the result somewhere you can’t send to a quantity surveyor. MEPCOUNT is a small free LISP routine that counts every block in a selection in one go, groups them by name (or by name and layer), and gives you the numbers as a table in the drawing or a CSV file for Excel.

Free download: MEPCOUNT.lsp + quick-start README (ZIP, 3 KB). Command: MEPCOUNT

Download MEPCOUNT (ZIP)

What MEPCOUNT does

  • Counts all blocks in one pass – select an area, or press Enter to count every block in the current space.
  • Groups by block name, or by block name + layer when the same symbol is used on different systems (for example a detector on a fire alarm layer and the same block on a BMS layer).
  • Handles dynamic blocks – a dynamic block whose visibility or size was changed becomes an anonymous *U block inside AutoCAD. MEPCOUNT reads its real name, so all variants are counted under one name.
  • Skips xrefs, so an attached architectural background does not show up in your quantities.
  • Ignores AutoCAD’s internal anonymous blocks (*X, *U, *T…) that drawings exported from other software are often full of. They are not real symbols, so MEPCOUNT leaves them out of the list and just tells you how many it skipped.
  • Three outputs: a report in the command line (always), an AutoCAD table placed in the drawing (optional), and a CSV file for Excel or your BOQ (optional).

How to install the LISP

  1. Download the ZIP above and extract MEPCOUNT.lsp to a folder you keep your LISP files in.
  2. In AutoCAD, type APPLOAD, browse to the file and click Load. Allow it if AutoCAD shows a security prompt.
  3. To have it available in every drawing, click Contents… under Startup Suite in the same dialog and add the file there.
  4. Type MEPCOUNT and press Enter.

If you have not loaded a LISP file before, the installation section of our Total Length AutoCAD LISP guide walks through the same steps with more detail on trusted locations and security settings.

Using MEPCOUNT step by step

  1. Select the blocks. Window or crossing-select the area you want – one floor, one zone, one riser. Only blocks are picked up, so you can drag across lines, text and hatches freely. Press Enter without selecting anything to count everything in the current space.
  2. Choose the grouping. Press Enter for Name, or type L for Layer.
  3. Read the report. The command line lists each block with its quantity and a total. Press F2 to see the full list.
  4. Place a table (optional). Answer Y and pick the top-left corner. The table uses your current text size, so set TEXTSIZE to suit the drawing scale first.
  5. Export to CSV (optional). Answer Y and choose where to save. The file name defaults to your drawing name plus -block-count.csv, and opens straight in Excel.

Where it helps on MEP drawings

  • Fire protection – counting sprinkler heads per floor or per zone before ordering, and cross-checking the count against the RCP when you mark sprinkler locations on site.
  • HVAC – supply and return diffusers, grilles, VAV boxes, FCUs and dampers for a takeoff or an equipment schedule check.
  • Electrical and ELV – light fittings by type, emergency fittings, sockets, detectors, call points and speakers.
  • Plumbing – fixtures, floor drains and cleanouts.
  • Submittal and as-built checks – comparing what is drawn against what is scheduled, before a consultant does it for you.

Pair it with Total Length LISP for pipe, duct and cable runs and Total Area LISP for areas, and most of a drawing-based takeoff is covered by three commands.

Limits you should know before trusting the numbers

  • Nested blocks are not opened. If six diffusers sit inside one “typical room” block, MEPCOUNT counts one room block, not six diffusers. Explode a copy or count inside the block definition.
  • It counts what is drawn, not what is installed. Duplicates stacked on top of each other are counted twice – run OVERKILL on a copy first if the drawing has been through many hands.
  • Block names matter. If one consultant’s “SPK-PENDENT” and another’s “Sprinkler_Pend” are both in the file, they appear as two lines. That is usually useful – it shows you the drawing is mixed.
  • “A$C…” names are real blocks with auto-generated names. AutoCAD creates them when objects are pasted with Paste as Block (Ctrl+Shift+V). They are counted like any other block – use the RENAME command to give them a meaningful name (for example “SUPPLY DIFFUSER 600×600”) and the count becomes readable.
  • Current space only. When you press Enter to count everything, it counts model space if you are in model, or the current layout if you are working in paper space.

Frequently asked questions

Doesn’t AutoCAD already have a COUNT command?

Newer full AutoCAD versions include a COUNT palette, and Express Tools has BCOUNT. They are fine for checking one symbol on screen. MEPCOUNT is built for takeoffs: every block at once, optional grouping by layer, dynamic blocks merged under their real name, xrefs ignored, and a CSV you can drop into a BOQ.

Does it work in AutoCAD LT?

Use full AutoCAD or a vertical built on it (MEP, Architecture, Civil 3D). AutoCAD LT has run LISP since the 2024 release, but MEPCOUNT uses Visual LISP ActiveX functions (vla-/vlax-), which LT does not support, so it will not run there.

Will it change my drawing?

No. It only reads block references. The only thing it adds is the table, and only if you ask for one – a single U undoes it.

Can I edit the code?

Yes. It is plain, commented AutoLISP. Open the .lsp file in Notepad or the Visual LISP editor.

Download MEPCOUNT – free, no sign-up.

Download MEPCOUNT (ZIP)

Related Posts

Mohamed Suhail

Author

Mohamed Suhail is a Mechatronics Engineer with practical experience in HVAC, Building Management Systems (BMS), MEP design, and industrial automation. He specializes in control valves, actuators, variable frequency drives (VFDs), HVAC controls, and technical product selection. Through BuildMEP, he shares practical engineering guides, design tutorials, calculators, and industry insights to help engineers, students, and facility professionals improve their knowledge and solve real-world MEP challenges.

Leave a Reply

Your email address will not be published. Required fields are marked *


Engineering tools, HVAC guides, calculators, and practical MEP resources.

Email

info@buildmep.com

Newsletter

© 2026 BuildMEP. All rights reserved.