Do you often find yourself needing to count or locate all instances of specific blocks in your drawing? With the Count feature, introduced in AutoCAD 2022, you can quickly and easily count instances of blocks and many other object types in your drawing.
For those using AutoCAD 2018 and later, Quick Select is a great alternative to the Count feature.
In this Have You Tried, we'll guide you through the process of using both the Count and Quick Select features, showing you how to count blocks, view detailed count data, use wildcard specifications, and count blocks on a specific layer. Moreover, we'll also show you how to create a table to organize and visualize your count results.
To follow along with these exercises, download the sample file.
Download: Sample file used for the exercises in the following sections.
Alternatively, do the following steps to create several blocks and place them on several layers.
The results might look something like this:
The Count feature provides a quick and efficient method to count instances of blocks and many other object types within a specified area or an entire drawing. It enhances the user experience by presenting visual results, including highlighted counted instances and detailed information displayed on the Count palette and toolbar. The Count feature also includes an error-reporting function that identifies potential discrepancies, ensuring the accuracy of your drawing.
Selecting a block starts an active count. When you're in an active count, a blue border appears around the drawing area and the Count toolbar is displayed at the top.
The Count feature presents visual count results, allowing you to easily view the information of a counted block. The count details may include the counted object’s general properties, any user-defined block attributes and parameters, or a count error report.
The Count palette displays the block names that start with the characters you type. This is useful when you need to quickly find blocks and their count based on a name.
The B424 blocks are highlighted. In this example, you can see an icon () displayed on the Count palette and Count toolbar. The block instance flagged with an error is highlighted in a different color (red).
Alternatively, on the Count palette, right-click B424 and choose Review Count Details.
AutoCAD zooms in to the block instance with the detected error.
Sometimes you'll need to present a comprehensive overview of your drawing, for example, when conducting a design audit or creating an inventory of design components. With Count, you can easily list the blocks and their count in a table.
If your blocks contain attributes, you can also extract and aggregate those values in a table with the Data Extraction feature. For more information, see Have You Tried: Extract Attribute Values from Blocks.
The field displays the current count of the selected block.
If you're using AutoCAD 2021 or earlier, the Quick Select feature is another powerful tool designed to streamline the object selection in a drawing. It allows you to filter and select objects based on shared properties such as object type, color, or layer.
In the following exercises, we'll guide you through a series of tasks using the Quick Select feature to count blocks in your drawing.
Alternatively, at the Command prompt, enter qselect.
The specified blocks are now selected and included in a new selection set, and an accurate count of the specified blocks is reported in the Command window.
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 blocks beginning with the letter B using B*, and all the blocks that have 4 as their second character using ?4*.
All blocks beginning with B are selected as shown below.
Once again, an accurate count is displayed.
All instances of blocks A410 and B464 are selected, and an accurate count is displayed in the Command window.
To count all blocks on a specified layer, follow these steps:
All blocks on layer 001 abc are added to a new selection set, and the block count is displayed.
At this point, you're probably asking yourself how you can narrow the selection using multiple criteria. For example, how can you count all instances of block A410 on layer 001 abc?
There's an easy way of doing this!
Currently, all 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.
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 selecting objects. For example, you can use Quick Select to do the following:
While there are other methods available in AutoCAD to count blocks, the Quick Select feature has the flexibility to be applied broadly to a variety of other tasks.
The Count and Quick Select features in AutoCAD simplify the process of counting blocks in a drawing. They help you identify, select, and manage blocks more efficiently.
Command | Description |
---|---|
COUNT | Counts and highlights the instances of the selected object in the drawing. |
COUNTAREA | Defines the area to count the instances of an object or block. |
COUNTFIELD | Creates a field that's set to the value of the current count. |
COUNTLIST | Opens the Count palette to display and manage the counted blocks. |
COUNTTABLE | Inserts a table containing the block names and the corresponding count of each block in the drawing. |
QSELECT | Creates a selection set based on filtering criteria. |
SELECTCOUNT | Finds all objects within the current count that match the properties of the selected objects, and then adds them to the selection set. |
SELECTSIMILAR | Finds all objects within the current drawing that match the properties of selected objects, and then adds them to the selection set. |
System variable | Description | Default value | Saved in |
---|---|---|---|
COUNTCHECK | Controls the types of errors to check in the count. | 2 | Registry |
COUNTCOLOR | Sets the highlighting color on objects in a count. | 3 | Registry |
COUNTERRORCOLOR | Sets the highlighting color on objects that can cause potential errors in a count. | 1 | Registry |