Nested Block Counter

See also Block Counter & Dynamic Block Counter

Function Syntax BlockCount
Current Version 1.5
Download BlockCountV1-5.lsp
View HTML Version BlockCountV1-5.html
Donate

"Not another block counter!" I hear you say...

...Well, this counter is slightly different to my previously uploaded Block Counter and Dynamic Block Counter programs.

Program Description

This program will generate a report detailing the individual quantities of primary and nested blocks, dynamic blocks & xrefs in a selection or an entire drawing.

The program will correctly count the number of nested blocks, nested dynamic blocks and nested xrefs, nested to any level, and with any number of instances of the same block at each level.

Of course, the program may be used as a standard block counter, since the nested block count data is displayed separately from the primary block count data, and the nested block report will not be shown if there are no nested blocks in the drawing.

The report is printed to the command-line and separately details the number of primary and nested blocks with a break-down of the quantities for each individual block name, together with the total number of primary and nested blocks located adjacent to the report headings. The printed report may subsequently be extracted to either a Text or CSV file.

Example of Output

=====================================================================
 Block Count
=====================================================================
 Primary Blocks (21)                                            Count
---------------------------------------------------------------------
 Block1............................................................16
 Block2.............................................................2
 Block3.............................................................3
=====================================================================
 Nested Blocks (8)                                              Count
---------------------------------------------------------------------
 Block1.............................................................5
 Block2.............................................................3
=====================================================================

See also Block Counter & Dynamic Block Counter

Instructions for Running

Please refer to How to Run an AutoLISP Program.

textsize

increase · reset · decrease

Designed & Created by Lee Mac © 2010