Overview of Using Lookup Tables to Assign Data to Dynamic Blocks

You can use a lookup table to define properties for and assign property values to a dynamic block. When you manipulate the block reference in a drawing, the property values associated with the block reference change.

You can use a lookup table to define properties for and assign property values to a dynamic block. Using lookup tables is a powerful way to associate parameter values for the dynamic block reference with other data that you specify (for example, a model or part number). You can extract this data from block references in a drawing just as you would extract block attribute data.

When completed, the lookup table assigns property values to the dynamic block reference based on how it is manipulated in a drawing. Conversely, you can change how the block reference is displayed in the drawing by changing the value of a lookup property of the block reference through a lookup grip or the Properties palette.

The following example shows a dynamic block reference for a lighting fixture. For this block, the Custom area of the Properties palette displays a size property. This property is defined in the lookup table for the block.

If you change the size of the lighting fixture in your drawing (using the custom grips), the size property in the Properties palette changes accordingly.

You can also use the lookup grip to change the display of the block reference. When you select a size from the list that is displayed when you click the grip, the block's geometry changes and the new size is displayed in the Properties palette under Custom.

Create a Lookup Table

After you've drawn the geometry and added the appropriate parameters and actions required for the dynamic block's functionality, you can add a lookup table to the block definition.

A blank lookup table is created when you add a lookup parameter to a dynamic block definition and then add a lookup action and associate it with the lookup parameter. The lookup table is displayed in the lookup table dialog box.

Add Properties and Values to a Lookup Table

The Property Lookup Table consists of input properties and lookup properties. Each input property and lookup property is represented by a column in the table.

After you add the properties (columns) to the table, you add values to the cells in each column. You click a cell and enter a value. Make sure to follow the guidelines in Specify Values for Lookup Tables.

If you defined a value set for an input property (parameter) in the table, a drop-down list of available values will display when you click a cell in that column.

The following lookup table is used for the lighting fixture block shown previously. The linear parameters that have been labeled “Height” and “Width” have been added as input properties. “Size” has been added as a lookup property. The values under Height and Width are taken from the value sets defined for each of those parameters. The values under Size are entered manually.

When the parameter values in a dynamic block reference match a row of input property values, the corresponding lookup property values in that table row are assigned to the block reference. These lookup properties and values are displayed in the Properties palette under Custom.

For example, when you edit the lighting fixture block reference to have a height of 250 centimeters and a width of 500 centimeters, the Size property in the Custom area of the Properties palette will display a value of 0.25 m x 0.50 m.

In the lookup table, at the bottom of the input properties is a row labeled <Unmatched>. When the parameter values in a block reference do not match a row of input property values defined in the block's lookup table, the lookup property value that corresponds to <Unmatched> is assigned to the block reference. The default value is Custom, but you can specify another value by changing it in the table.

Enable Reverse Lookup

You can also specify that a lookup property allows for reverse lookup. This adds a lookup grip to the dynamic block reference. When you click this grip, a drop-down list of the lookup values for that lookup property (column in the table) is displayed. When you select a value from the list, the corresponding input property values are assigned to the block reference. Depending on how the block was defined, this usually results in a change in the block reference's geometry.

To enable reverse lookup for a lookup property, each row in the lookup table must be unique. After you add properties and values to the table, you can check for errors and empty cells by clicking the audit button in the Property Lookup Table dialog box. You can also use the shortcut menu options to insert, delete, or reorder rows.

NoteIf you leave a cell empty in the lookup properties column and the cell has an associated input property in the same row, the lookup property will not allow for reverse lookup.
See Also