In this tutorial, I'll expand on the idea of using fields in attributes, which are labels attached to blocks. This example shows the use of fields that label geometric parameters of dynamic blocks.
Open the Block Editor. (Tools> Block Editor or Blocks & References tab> Block panel> Block Editor.
Create the objects for the block.
Create the parameter and action you want to label. For example, for a desk, I created a Linear Parameter and a Stretch Action. I renamed the Linear parameter's label to Length in the Properties palette. If you need further instructions, you can download my complete dynamic blocks tutorial from my "Dynamic blocks tutorial" page.
Start the ATTDEF command (Draw> Block> Define Attributes or Blocks & Reference tab> Atrtributes panel> Define Attributes).
In the Attribute Definition dialog box, type in a tag name, such as Length. For the Deafult entry, type the text that you want to appear before the value, such as Length: . (Add a space after the colon.) Check the Constant check box so that you won't get a prompt. The whole point is to make the label automatic. Set the Text Settings section as desired.
Then right-click in the Default text box or click the Insert Field button at the right to open the Field dialog box. From the Field Category drop-down list, choose Objects. Then choose BlockPlaceholder as the field name. The Block reference property should be the name of the parameter you used. This is Length in our example. Set the format as desired, and click OK.
Note: The Length property is on the list only because I created a parameter named Length. The other properties are available for all blocks.
You're now back in the Attribute Definition dialog box, which should look like the figure below. Click OK. Place the label where you want it.
Save the dynamic block by clicking the Save button in the Block Editor. Close the Block Editor.
Back in your drawing, insert the block (Insert> Block or Blocks & References tab> Block panel> Insert). Before you specify the insertion point, you'll see the following for the label.
After you insert the block, you'll see the value of the field.
After you modify the dynamic block, you'll need to update the field. In this example, changing the length makes the desk longer. Enter updatefield on the command line to update the field.
This is the 9th edition of this book! Completely updated to conform to the new interface and, of course, it covers all the new features, such as the ribbon, Quick View, ShowMotion, the View Cube, the SteeringWheel, and more.
AutoCAD 2008 and AutoCAD LT 2008 Bible Learn the great new features with wide application to all disciplines. Get the most comprehensive book on AutoCAD! DVD contains a 30-day trial of AutoCAD and AutoCAD LT. Thorough exercises guide you through each feature.
AutoCAD 2007 and AutoCAD LT 2007 Bible Discover the 2007 features, especially the radically improved 3D tools. CD has AutoCAD 30-day trial, 3rd-party software, and drawings for exercises.