![]() |
![]() |
Visit Our Online Bookshop for 10% off all Autodesk Press Products |
by Ralph Grabowski Attributes are an easy concept, but for most of AutoCAD’s life they were difficult to use. Attributes are data you attach to blocks (in some other CAD packages, attributes are known as tags). The data can be just about any kind of text: model number, manufacturer, price, etc. This month’s column is about editing attributes, not creating nor extracting them. Briefly, however, you use the following procedures: Step 1. Define attributes with the AttDef command. Step 2. Bind the attributes to a symbol with the Block command. Step 3. Insert the block with its attribute with the Insert command. Step 4. Edit attributes in inserted blocks via the EAttEdit command (AttEdit in AutoCAD 2000i and earlier). Step 5. Extract attributes from the drawing to a file via the EAttExt command (AttExt in AutoCAD 2000i and earlier). You may notice that one subject of this month’s column, BAttMan, is missing from the list above. Before describing it, though, let me spend a moment explaining the two kinds of blocks: definition and insertion: Block Definition: When you create a block with the Block command, AutoCAD stores its definition in the drawing. You cannot see the block definition in the drawing. Block Insertion: When you insert a block in the drawing with the Insert command, AutoCAD looks up the block definition and creates an instance, called a "block insertion." When you see a block in a drawing, you are seeing the insertion version. You can, of course, insert a block as often as you like; the drawing then contains many block insertions, but only one block definition. If the block definition is changed, all its related block insertion changes, too. The opposite is not true: change a block insertion (Explode, RefEdit, and EAttEdit) does not affect the block definition. Getting closer to this month’s topic, when you change the attributes in a block definition with the BAttMan command, this changes the attributes in all block insertions. The converse, again, is not true: when you change the attributes in a block insertion with the EAttEdit command, this doesn’t change the attributes in the block definition. Tips * Attributes can be attached to blocks only. To attach data to any object, you need to use "xdata," for which AutoCAD provides no user-friendly tools. * As an alternative to attributes, consider using hyperlinks (via the Hyperlinks command), which attaches one or more links to any object(s) in the drawing. * To connect the drawing with an external database, use dbConnect.
----------------------------------------------------------------------- Command: BAttMan Purpose: Allows editing of almost every aspect of attributes in a block. Notes: Meant for use with block definitions; use EAttEdit for block insertions. Aliases: none Shortcut: Alt+MOAB Menu bar: Modify | Object | Attribute | Block Attribute Manager Tablet menu: none Status bar: none Toolbar: Modify II Commands: EAttExt Purpose: Allows editing of almost every aspect of attributes in a block. Notes: Meant for use with block insertions; use BAttMan for block definitions. Aliases: none Shortcut: Alt+MOAS Menu bar: Modify | Object | Attribute | Single Tablet menu: none Status bar: none Toolbar: Modify II
Related commands: AttDef Defines attributes. Block Binds attributes to a symbol. Insert Inserts a block with its attributes. AttSync Synchronizes attributes in block insertions. EAttExt Extracts attributes from the drawing (AttExt in AutoCAD 2000i and earlier).
Related system variables: none Example command usage: Command: battman (Displays the Block Attribute Manager dialog box.) Command: eattext (Displays the Enhanced Attribute Editor dialog box.)
View Past Commands of the Month
|
|||||||||||||||||||||||||||||||