Вы находитесь на странице: 1из 3

Use fields to automatically label dynamic

blocks
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.

1. Open the Block Editor. (Tools> Block Editor or Blocks & References tab> Block panel> Block
Editor.
2. Create the objects for the block.
3. 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.

1.Start the ATTDEF command (Draw> Block> Define Attributes or Blocks & Reference tab>
Atrtributes panel> Define Attributes).
2. 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.
3. 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.

1. 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.
Use fields to automatically label dynamic
blocks

1. Save the dynamic block by clicking the Save button in the Block Editor. Close the Block Editor.
2. 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.

1. 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.
Use fields to automatically label dynamic
blocks

Вам также может понравиться