CADXChange

Guides/Symbols & blocks

Count Blocks Across Multiple Drawings — Build a BOM in Excel from a Whole Drawing Set

Made with BlockSync
BlockSync with six HVAC drawings added and three equipment blocks ticked, each with its reference count

Short answer: AutoCAD's COUNT command reports the blocks of the drawing you have open. DATAEXTRACTION can read several drawings, but you walk through its wizard and tidy the table that comes out. For quantities over a whole set, it is simpler to get one row per block into Excel and count the rows.

A bill of materials is spread over a plan per floor, a plant room and a few diagrams. Counting by eye is slow, and it has to be done again after every revision.

This guide uses BlockSync, part of CADXChange Toolkit, to export the block references and an Excel pivot table to count them. The drawings are only read. The example is six HVAC drawings.

1. Add the drawings and tick the blocks to count

Open BlockSync, choose Blocks → Excel and add the drawings with Add Files… or Add Folder…. The Blocks tab lists every block with its number of references and the number of files that contain it.

Tick the blocks you want to count and note their reference totals, here 15 dampers, 29 diffusers and 17 fan coil units: they are your check later. A block definition can sit in a drawing without being placed, so the number of files is not the number of drawings that use it.

2. Export to Excel

Click Extract to Excel. Each ticked block gets its own sheet with one row per reference: the drawing in _File, where it sits in _Space, a few more columns that identify and position it, then one column for each attribute.

In _Space, Model means model space and *Paper_Space names are layouts. A block name there means the reference is inside that block's definition.

The exported diffuser sheet with file name, space, size and type columns, including one reference on a layout

3. Put the blocks in one list

On a new sheet, make the columns File, Block, Type and Qty. Stack _File and _Block from every block sheet, fill Type with the attribute that separates the variants, such as a model or a size, and put 1 in Qty.

Filter on _Space before copying if only model space should count, so a symbol drawn on a layout as a legend is left out. A block placed inside another block appears once however many times the outer block is inserted; count those separately.

If no block is nested, the rows you kept plus the rows you left out must equal the totals you noted. In the example one diffuser is a legend symbol on a layout, so 61 references give 60 rows to count.

The combined list with File, Block, Type and Qty columns

4. Count with a pivot table

Select the list and choose Insert → PivotTable. Put Block and Type in Rows, File in Columns and Qty in Values as a sum. You get one line per item and variant, a column per drawing and totals on both sides: here 15 dampers, 28 diffusers and 17 fan coil units, 60 items in all.

A pivot table with damper, diffuser and fan coil variants in rows, six drawings in columns and a grand total of 60

5. Repeat after a revision

Save Profile… keeps the ticked blocks under a name. When the drawings change, load the profile, export again, replace the list and choose Data → Refresh All.

A count can only be as good as the blocks. An item drawn with loose lines or exploded is not counted, and the same symbol under two block names gives two lines. Look over the Blocks tab before relying on the numbers.

CADXChange Toolkit includes a 30-day full trial. After it, writing to drawings needs a licence and exports are limited to a short sample.

Try it on your own drawings

CADXChange Toolkit does this for a whole folder of drawings, with a preview and a backup first. The 30-day trial has every feature.

Start the free trial →

Before you start — common questions

How do I count a block across many drawings?
Export the references of that block from all the drawings with BlockSync. The sheet has one row per reference with the file name, so a pivot table gives the number per drawing and in total.
Can I count variants such as valve sizes?
Yes, when the variant is held in an attribute or a dynamic block property that appears as its own column. Use that column as the type in the pivot table.
Does counting change the drawings?
No. The export only reads them.
Do I need AutoCAD?
No. BlockSync reads the DWG files itself. You need Excel or another spreadsheet that makes pivot tables.

Related guides