Performancing Metrics

Sunday, April 19, 2015

Learning Autocad: Creating Smarter Blocks With Attdef

In learning AutoCAD, almost every user discovers they can use the BLOCK or BMAKE commands to give a name to a set of objects in a drawing. Most know they can use the WBLOCK command to export that block into a completely independent drawing if desired. They also know how to use the INSERT command or Design Center to place these blocks into any drawing as required.

What most AutoCAD users do not know is that they can use the ATTDEF command to define an attribute object which asks users questions when blocks are inserted.

To create an attribute, use the ATTDEF command to you name the attribute (PartNumber for example), provide a default value (12-3456789 for example) and provide a prompt or question to ask the user (What is the part number for this block?).

After you define the attribute or attributes you want to insert into a block, you can just use the BLOCK or BMAKE commands and select all the geometry and attributes you want to put into the block object. Whenever you insert this block, you will find you are prompted to answer questions. You can use the ATTEDIT command to edit attributes in inserted blocks as required.

When you create attributes you can put them on their own layer. This makes it easy to hide them or display them by turning the layer they are on off. This is handy when you are using attributes to hold information like phone numbers on a desk floor plan. Sometimes you will want to see, and plot, the desks without the text.

Probably the most interesting application for attributes is that you can use them to create tables and reports that accurately reflect the information you have stored in your blocks. The process for doing this is somewhat complex. The ATTEXT command exports the data in attributes to a file. But you must create a “template file” that lists the names of the attributes you want to extract.

Extracted data is stored in a space delimited file that you can import into any spreadsheet. Many people use attributes to create accurate parts lists and tables.

If you haven’t become familiar with AutoCAD’s attribute commands, you have missed out on one of its most flexible and useful tools. Attribute commands change from version to version, but ATTDEF and ATTEDIT have been in every version you are likely to have access to.

You can learn more about attributes by checking out the AutoCAD Help files. Step by step tutorials that show how to use attribute appear at Please Login or Register to see the link.. Just search for ATTDEF.

Nancy Fulton is a writer, publisher and founder of the Complete Support website. You can find more of her work at Please Login or Register to see the link. and Please Login or Register to see the link..

If you found this post helpful, do my a favor and please press the Facebook “like” button below. 

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

What is 12 + 5 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)