Using the AutoCAD Data Extraction wizard (DATAEXTRACTION) you can easily create a table with an automatic counter of blocks of a specific name.
This table is then dynamically updated when you delete or add new blocks. The blocks are specified in the wizard, so their specification is stored in a DXE definition file. You can invoke the table update either manually (DATALINKUPDATE), or it is performed by default before the commands PLOT/PUBLISH, or you can add it by setting the DXEVAL variable also to the Save event.
You can schedule blocks, their layers, attributes or parameters and visibility states of dynamic blocks.
Using data extraction to create a counter is illustrated in the video:
The resulting value from this table can be then further linked to a specific property of other drawing objects (e.g. size) - see XLSparam - tip 11896 or referred (dynamically, see Insert>Expression>Cell) from a different table using a field/expression.
Another option is creating a block legend using the BLegend utility - see Tip 6724.
Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above).
You may also add a link to your web - like this "fan" link:
Featuring: Export 3D VRML scenes from AutoCAD and Inventor VRMLout
Please use these tips at your own risk. Arkance Systems is not responsible for possible problems that may occur as a result of using any of these tips.