Block Attributes are an integral component of nearly every AutoCAD-based project I’ve worked on. Beyond the ubiquitous title block, Block Attributes are commonly used for Room Tags, to display calculations, and more. Whilst it isn’t too difficult to update a couple of Block Attributes, when the blocks to update ventures beyond that – the task quickly becomes as tedious as it is time-consuming.
I’ve long wished AutoCAD had a command that would let you link a block to something like an Excel spreadsheet. Although that wish has never been granted, the next best thing exists in the form of AutoCAD’s Express Tools. Two of my favorite Express Tool commands are ATTIN and ATTOUT. Put simply, the commands will export Block Attribute values to a Tab-Delimited text file (ATTOUT), and update Block Attribute values from a Tab-Delimited text file (ATTIN). In the video above I demonstrate how to use these commands in tandem with Microsoft Excel to quickly renumber the room tags in a floor plan.
Tips for Updating Attributes with Excel
Whislt the blocks can be anything you wish, there are a few tricks to using this method in production:
- Blocks are updated based on their Handle ID: Every object (including blocks) are assigned a unique Handle ID. No two objects in an AutoCAD drawing will have the same Handle ID, and the ID itself is designed to function as a unique identifier in the DWG database. This means you can move a block anywhere you wish in the drawing (even a different Layout tab), but you cannot erase the block. Erasing the block will change the Handle ID for the object, and thus break this method.
- You may combine multiple TXT files: The ATTOUT command will generate a separate TXT file each time you run the command. Especially if you’re updating the same block (not to be confused with block insertion), you can combine multiple TXT files into a single TXT file if you wish. Using the example in the video, you may export the Room Tag block attribute values for each floor in your design – thus resulting in a TXT file for each floor. You can combine these TXT files into a single TXT file to simplify things a bit.
- Save as Tab Delimited Text File in Microsoft Excel: I will typically create an Excel spreadsheet that performs various calculations. When exporting your data from Excel, be sure to select tab delimited as the file type.