Blocks and Attributes go together like Tom & Jerry, like Kate and Prince William, like chicken wings and beer, like Kim Kardashian and Kanye West…. ok, maybe not the last one, but hopefully you get the picture. Attributes is a method to have variable text with a block. It provides the ability to insert multiple instances of the same block definition but each one with different attribute text information. Inserting multiple toilets into your floor plan but each one is a different manufacturer, style, colour, with different capacities? No problem, why you need to add attributes?

Attributes additionally, are easy to extract. Extract to an external file or extract as a table in the drawing. Do you need to show how many doors of a particular size are in the drawing? You need to use blocks with attributes.

Defining Attributes

Creating attributes starts while you are laying out the block geometry, before you start the block defining process, you want to include the attributes as you are selecting the geometry to include in the block. Attributes are built with the ATTDEF command, found on the INSERT tab of AutoCAD’s Ribbon.

Defining AutoCAD Block Attributes

The Basics…

  • The TAG is the name of the attribute, similar to a parameter / variable within programming. The name cannot contain spaces nor special characters. It should describe what the variable will contain.
  • The PROMPT is what will be presented as you are inserting the block or editing the attribute values. The TAG is the internal name, the PROMPT is end user facing.
  • The DEFAULT value is optional. In some cases you might want to set the default to provide hints / tips on how the attribute should be completed. For example, if the attribute is for ‘Drawn By’, enter your initials to show initials are needed. Or if you prefer the date in a particular format set the default to something like yyyy-mm-dd.
  • Within the Text Settings area you select the desired Justification, Text Style, Text Height, and Rotation. Text Style will list the text styles available within the drawing, there is no option to define new.
  • Insertion Point sets the location of the insertion point for the attribute. Unless you know the exact coordinates to numerically enter enable Specify on-screen, which means you will pick the desired location within the drawing area once you click OK.

The Options…the Mode area of the upper left corner of the dialog are for additional options for the behaviour of the attribute. Many will be self explanatory, some will be easy to understand, some will seem odd but you have to remember that attributes have been in AutoCAD forever, so a couple are legacy options and not used frequently any more.

  • Invisible – Attribute does not appear within the drawing when the block is placed… why would you want this? When you want to extract the attribute value but do not need to see it on the drawing
  • Constant – this forces the attribute to a fixed value, so it cannot be changed.
  • Verify – Verify was used for important attributes, such as entering attribute values via the commandline, these attributes would prompt twice to ensure they were seen by the user.
  • Preset – When entering attribute values via the commandline, the attribute is set to the default value. The attribute value can be edited afterwards, just not initially.
  • Lock Position – the attribute is locked in position. It will still move with the block, but it cannot be moved independently from the block.
  • Multiple Lines – the attribute supports multiple lines if this option is enabled. Although it is not true MTEXT it does allow for more than one line of text.

When inserting a block with attributes you will be prompted upon picking the insertion point, to complete the attribute values. Whether this occurs in a dialog or via the command line is dependent on the ATTDIA system variable. ATTDIA = 1 means a dialog is used to enter the attribute values.

Editing Attributes

What is the easiest way to edit a block’s attributes after insertion? Double-click it. Or when in doubt, right-click! With the block selected right-click and select Edit Attribute.

AutoCAD Enhanced Attribute Editor

You might not only notice this is the Attribute Editor but it is also the Enhanced Attribute Editor! The Attribute tab is used to modify the value of the attribute. Here’s a tip; double click within the block on the attribute you want to edit and it will be selected automatically when the Attribute Editor appears. Another tip; use the Select block option in the upper right-corner to switch to another block to edit its properties.

AutoCAD Enhanced Attribute Editor

The Text Options tab is used to modify text properties of the attribute. Use this to make the attribute for this block instance different than the others , including adjusting the Text Style, Justification, and Height. The Properties tab is used to override the attributes properties for the block instance, including layer, colour, and lineweight.

How about modifying the attribute for all block instances? As in how do we modify the attribute for the block definition opposed to individual block instances? You use the Block Attribute Manager…. BATTMAN!

AutoCAD Block Attribute Manager

BATTMAN isn’t used to edit the value but to edit properties of the attribute itself. Adjust the prompt, the default value, and the order the attributes appear when editing. Select Settings to add other properties to the manager for modification. For example; add locked, rotation, and visible to be able to toggle the attribute between locked / unlocked, its rotation amount, and whether it is visible or invisible.

Although this covers a significant portion of working with Attributes, there is still more to see. In upcoming posts we will explore adding attributes to existing blocks as well as how to extract block attribute values quickly and easily… so in the words of BATTMAN, ooops I mean Batman, make sure to tune in, Same Bat Channel, Same Bat Time!