Count feature to easily count instances of blocks and many other object types.
Have you ever found yourself counting blocks? Maybe you want to find all instances of a certain block on a specified layer. There’s a super-fast way of getting an accurate block count in a drawing using the Quick Select feature. Quick Select also speeds up the process of locating blocks or any other objects with certain properties.
Prepare for the Walkthrough
The purpose of the following steps is to create several blocks and place them on several layers.
- Start a new drawing.
- Create three blocks and name them A410, B424, and B664.
- Create two new layers named 001 abc and 005 def.
- Insert 5 more instances of A410 on layer 001 abc.
- Insert 4 more instances of B424 on layer 001 abc.
- Insert 3 more instances of B664 on layer 005 def.
The results might look something like this:
Count Blocks by Name
- Click the Home tab, Utilities panel, Quick Select, or enter QSELECT at the Command prompt.
- In the Quick Select dialog box, choose Block Reference and choose A410 from the list, as shown in steps 1-6 as shown below.
- Click OK.
The specified blocks are now highlighted and included in a new selection set, and an accurate count of the specified blocks is reported in the Command window.
- Press Esc to clear the selection set.
Count Blocks with Wildcard Specifications
Sometimes you’ll need to count blocks using a general name pattern. The most common wildcards used are “?” for a single character and * for any number of characters. For example, you can search for all the blocks beginning with the letter B using B*, and all the blocks that have 4 as their second character using ?4*.
- Start the QSELECT command again, this time specifying a Wildcard Match with the Value: B* as shown below and click OK.
All blocks beginning with B are selected as shown below.
Once again, an accurate count is displayed.
- Press Esc to clear the selection set, and repeat the operation, except use ?4* in the Value field and click OK.
All instances of blocks A410 and B464 are selected and an accurate count is displayed in the Command window.
Count Blocks on a Layer
To count all the blocks on a specified layer, follow these steps:
- Start the QSELECT command.
- Specify Layer and choose 001 abc for the Layer value and click OK.
All the blocks on layer 001 abc are added to a new selection set, and the block count is displayed.
- Don’t clear the selection set yet. You’ll need the blocks selected for the next steps.
Narrow Down a Selection
At this point, you’re probably asking yourself how you could narrow the selection using multiple criteria. For example, how can you count all instances of block A410 on layer 001 abc?
There’s a great way of doing this! Here are the steps:
- Start the QSELECT command.
Currently, all the blocks on layer 001 abc are selected. Notice that the Apply to field has automatically switched to Current selection as shown below.
This means that only the current selection set will be used rather than the entire drawing.
- Next, choose Name and then block A410 and click OK.
All the A410 blocks (only) on layer 001 abc (only) are selected. With any selection set, you can repeat the QSELECT command to continue narrowing your selection.
Notice that you can start with a manually specified selection set of a portion of the drawing area, further filtering it with a succession of Quick Selection operations.
In addition to providing a fast way of counting specified blocks, the Quick Select feature can also be used for many other tasks involving a selection set. For example, you can use Quick Select to do the following:
- Select a subset of objects on a layer, and then assign them to a different layer.
- Select all dimension objects regardless of layer, and then change their color.
- Identify geometric objects with Z coordinates not equal to 0, and then set their Z coordinates to 0.
While there are other methods available in AutoCAD to count blocks, the Quick Select feature has the advantage of the flexibility to be applied broadly to a variety of other tasks.
Have You Tried articles can jumpstart new ways of working with AutoCAD, you can discuss and share ideas with others in the companion post on the AutoCAD forum.