You are on page 1of 33

AutoCAD®

2006

Dynamic Blocks in AutoCAD


Part 1 of 3: Dynamic Block Overview
and Quick-Start Tutorial.
In AutoCAD® 2006 software, you can now create
CONTENTS
blocks that are intelligent and flexible. This exciting
How You Can Use
new feature, called Dynamic Blocks, enables you Dynamic Blocks ....... 2

to modify blocks within specific constraints. A block How to Create a


Dynamic Block ......... 3
library might have dozens of windows (if Adding Parameters
architectural) or bolts (if mechanical). With and Actions............... 4

Dynamic Blocks, you can create one block that Constraining Values
for Block Components
takes the place of all these related blocks and be ................................... 6

confident that modifications match the dimensions Using Parameter Sets


................................... 6
of their real-world objects. As a result, the process
Inserting and Editing
of finding the right block is much more efficient. Dynamic Blocks ....... 7
Inserting and editing the block is practically error- Quick-start Tutorial .. 8
free. Conclusion................ 9
Furthermore, you can individually modify components of blocks. For example, within a
desk set, you could move the chair, change the type of telephone, change the desk size,
and specify the size of the computer’s monitor. Thereby, you can work with one block that
contains multiple editable components in place of several blocks. Facilities management
was never so easy!

This first of three articles explains the basic concepts of Dynamic Blocks and ends with a
quick-start tutorial. Part two provides detailed documentation of the feature. Part three
introduces some of the advanced uses for Dynamic Blocks.
Dynamic Blocks in AutoCAD: Part 1

How you can use Dynamic Blocks


Once you create a Dynamic Block and specify its features and constraints, you modify the
block after you insert it, using special grips. As you click or drag the grips, the block
adjusts according to its allowable flexibility. In other cases, you can choose options from a
drop-down list to specify how to modify the block.

Here are some possible scenarios for using Dynamic Blocks:

ƒ A door that can be stretched to increase its width without increasing its thickness
ƒ A bolt that can be lengthened without increasing its thickness
ƒ A bed that can be changed from twin to queen to king, adjusting the number of
pillows appropriately
ƒ A picket fence that allows for specific various post heights and then automatically
arrays those posts as the fence is stretched
ƒ A rectangular metal plate with a centered hole that stays centered as the plate is
stretched
ƒ A piece of equipment (such as a phone or a computer monitor) that can take one
of several forms that is chosen from a drop-down list

You can make any existing block dynamic by adding dynamic features to it. The office set
in the figure includes a desk, three chairs, a computer, and a phone. This block is
constructed so you can stretch the 6-foot desk to 7 feet or 8 feet. As you drag, the chair
behind the desk and the computer both move, always remaining centered between the
two sides of the desk. The right chair in front of the desk moves to remain aligned with the
right side of the desk. Without Dynamic Blocks, you would have to manually adjust all the
separate components when you stretched the desk.

This chair moves along with


the right side of the desk.

The desk stretches.


Constraints limit the
desk length to 6’, 7’, or
8’.

The computer and chair move as the desk


stretches, but only half the distance, so
they stay centered in relation to the desk.

Figure 1: Editing a
Dynamic Block
A multi-component block, such as the one above, can feature as much complexity as you
want. For example, the type of phone, the type of monitor (CRT or LCD), the size of the
monitor, or the type of computer (desktop or laptop) are all easily changed

www.autodesk.com/autocad-blocks 2
Dynamic Blocks in AutoCAD: Part 1

How to Create a Dynamic Block

A Dynamic Block is created (authored) in the new Block Editor by starting from an existing
block or individual objects. When a block is opened in the Block Editor, you can select and
edit the individual objects that make up the block; you don’t have to explode it first. After
saving your changes in the Block Editor, you can insert your new Dynamic Block and test
it out!

To start authoring a Dynamic Block based on existing blocks, open the drawing that
contains the block. Then open the Block Editor using one of the following methods:

ƒ Click Block Editor on the Standard toolbar


ƒ Enter bedit on the command line or in the dynamic input tooltip
ƒ Choose Tools > Block Editor from the drop-down menu

After the Edit Block Definition dialog box appears, you can choose any block in the
drawing. If you want to turn all of the objects into a Dynamic Block, choose <current
drawing> to work with the entire drawing. You’ll then be able to insert the entire drawing

Note: If you want to use the Design Center to insert the Dynamic Block (which
you would do for a block library drawing with more than one Dynamic Block),
choose the block you want to edit.

If the block is dynamic, it shows


the dynamic symbol.

Figure 2: The Edit Block


Definition dialog box

www.autodesk.com/autocad-blocks 3
Dynamic Blocks in AutoCAD: Part 1

Click OK, and you’re in the Block Editor. The Block Editor is a special
window for editing Dynamic Blocks. The Block Editor has its own
toolbar that provides commands for working with Dynamic Blocks. At
the same time, the Block Authoring Palettes window opens. The
palette has three tabs that are used for turning ordinary blocks or
objects into Dynamic Blocks.

Figure 3: A Dynamic
Block in the Block
Editor

Adding Parameters and Actions


Compared to a regular block, a Dynamic Block generally has two additional items—a
parameter and an action. Of course, you can add more than one of each. A parameter
defines the features of the geometry of the objects you want to change. An action defines
the modification that acts on the parameter. Each action is attached to a parameter.

One exception is the alignment parameter, which doesn’t require an action. An alignment
parameter in a Dynamic Block enables you to quickly align the block with other objects in
the drawing—either tangentially or perpendicularly. Many blocks can benefit from an
alignment parameter in addition to the other dynamic features they contain.

The simplest example is a Dynamic Block that allows you to independently move an
object in a block, based on a specified point on the object. You use the point parameter to
specify the point and then attach a move action to that parameter. When you insert and
select this Dynamic Block, you will find a grip on the point you specified. You can then
move the object from that point.

You choose a parameter based on the geometry you want to control and the position,
distance, and/or angle you want to specify. Then you choose an action that modifies that
parameter. Actions are similar to editing commands—they move, stretch, rotate, scale,
array, and mirror (flip) objects.

www.autodesk.com/autocad-blocks 4
Dynamic Blocks in AutoCAD: Part 1

To choose a parameter, click one of the parameters on the Parameters tab of the Block
Authoring palette and then respond to the prompts for that parameter. The prompts vary
with the parameter, but you generally specify the following:

ƒ Start point: The first point of the distance (a point parameter has only one point)
ƒ Endpoint: The end point of the distance, which may also define an angle
ƒ Label location: A place for the parameter’s label (the label location is for your
convenience)

For instance, you may want only one parameter point and grip, perhaps at the right side of
the distance parameter. You can right-click the parameter, and then choose the number of
grips you want from the Grip Display item on the shortcut menu. The example shows one
grip only. If you wanted to add two stretch actions—one to stretch from the left point and
another to stretch from the right point—you would use two grips.

When you finish your parameter, an exclamation point appears to remind you that an
action still needs to be added.

Figure 4: A linear
parameter without an
associated action

To assign an action, click the Actions tab and choose one of the actions. Some restrictions
apply—for example, you can only assign a rotate action to a rotation parameter. The first
prompt always asks you to select a parameter. The next prompt usually asks you to
specify which parameter point you want to associate with the action. For example, if you
want to stretch an object with a linear parameter, do you want to stretch from the left point
or the right point?

The next prompts depend on the action, but you generally need to select the objects you
want to include in the selection set for the action. If you want the parameter to move as
the object moves, you include the parameter in the selection set. Finally, you place the
action’s label. The label has no effect on the Dynamic Block and is simply for your
convenience when you edit the block. When you’re done, the exclamation point should
disappear, which signals that you’ve successfully assigned the action to the parameter.

Figure 5: A block with


a stretch action
attached to its linear
parameter

www.autodesk.com/autocad-blocks 5
Dynamic Blocks in AutoCAD: Part 1

Constraining Values for Block Components


If you’re creating a block for a desk, you probably need to restrict the desk size to the
sizes available from your supplier. A great feature of Dynamic Blocks is the ability to
specify either a list of values or possible increments with minimum and maximum values.
This feature is called value sets and it helps avoid time-consuming mistakes! Value sets
offer the perfect balance of flexibility and control.

Let’s say that you only buy desks that are 4 feet, 5 feet,
or 6 feet 6 inches long. In this case, you can use a list
value set and simply supply these three values. Then
you can only stretch the desk to one of those three
values. On the other hand, you may have a part whose
length is in increments of 1 inch, but never less than 3
inches or more than 20 inches. In that case, you can
use an increment value set to specify those values and
constrain the length of the part accordingly.

You specify a value set when you create a parameter.


You can choose the Value set option when you choose
a parameter and provide the details on the command
line or in the dynamic input tool tip. You can also select
an existing parameter and create the value set in the
Properties palette.
Figure 6: The
Parameter Sets tab of
the Block Authoring
Palettes window

Using Parameter Sets


AutoCAD 2006 software comes with a number of pairs of parameters and actions you can
use, almost straight out of the box. These sets are a great way to get started with Dynamic
Blocks. Click the Parameter Sets tab on the Block Authoring Palettes.

The parameter sets combine the most commonly used pairs of parameters and actions,
such as a point parameter with a move action and a linear parameter with a stretch action.
You still have to choose the geometrical points for the parameter and place its label.

The only missing information is the selection set for the action. For this reason, when you
place a parameter set, you see one or more exclamation points to alert you that you need
to select objects. Double-click the action and then select the objects. That’s all there is
to it.

www.autodesk.com/autocad-blocks 6
Dynamic Blocks in AutoCAD: Part 1

Inserting and Editing Dynamic Blocks


When you finish creating your Dynamic Block, save it by choosing Save Block Definition

on the Block Editor toolbar. Close it by clicking the Close Button Editor button.

Open a new drawing or any drawing in which you want to insert the Dynamic Block. If you
saved your block as one of a number of blocks in a drawing that functions as a block
library, insert the block from the DesignCenter™ function. If you edited the entire drawing
(choosing <current drawing> when you opened the block editor), choose Insert > Block
from the menu and insert the drawing.

Select the block, and then you will see one or more Dynamic Block grips, which are
usually clicked or dragged. For example, if you added a stretch or move action, the block
stretches or moves as you drag a grip. If you added a flip action, you just click the grip to
flip the block.

Click to flip (mirror)


door left/right

Click to flip
(mirror)
Drag to stretch door up/down
wall thickness

Drag to stretch width


of opening

Drag to move door


in any direction

Click to choose Figure 7: Click or drag


open angle of door a Dynamic Block grip
(30, 45, 60, 90, or to edit the block
closed)

www.autodesk.com/autocad-blocks 7
Dynamic Blocks in AutoCAD: Part 1

Quick-start Tutorial
Although this white paper is not meant to be a complete tutorial, we’ve included a short,
simple lesson to help you get started with Dynamic Blocks. After you have created your
first Dynamic Block, you’ll see that the process is not as difficult as it first might seem.

This tutorial adds a linear parameter and a stretch action to a desk.


1. Open office set.dwg. If you would like to keep the original drawing without
changing it (for example, if you want to do the tutorial again), choose File > Save
As and save it under a different name. Remember where you saved it.

2. Choose Block Editor from the Standard toolbar.

3. In the Block Edit Definition dialog box, choose the deskset block. Click OK. The
Block Editor opens and the Block Authoring Palettes window appears.

4. Click the Parameters tab of the palette and choose Linear Parameter.

5. At the Specify start point or [Name/Label/Chain/Description/Base/Palette/Value


set]: prompt, pick the upper-left corner of the desk.

6. At the Specify endpoint: prompt, pick the upper-right corner of the desk.

7. At the Specify label location: prompt, pick a location above the desk for the label.

8. Select the parameter. Right-click and choose Grip Display > 1 from the shortcut
menu. The left grip disappears.

9. Click the Actions tab of the palette and choose Stretch Action.

10. At the Specify parameter: prompt, pick the Linear parameter you just inserted.

11. At the Specify parameter point to associate with action or enter [sTart
point/Second point] <Start>: prompt, move the cursor over the right grip. Click
when you see the red marker.

12. If OSNAP is on, turn it off.

13. At the Specify first corner of stretch frame or [CPolygon]: prompt, click at Point 1
in the figure.

14. At the Specify opposite corner: prompt, click at Point 2 in the figure.

15. At the Specify objects to stretch Select objects: prompt, click near (but not
exactly on) Point 2.

16. At the Specify opposite corner: prompt, click near (but not exactly on) Point 1.

17. At the Select objects: prompt, press Enter to end selection.

18. At the Specify action location or [Multiplier/Offset]: prompt, pick a point to the
right of the desk for the label.

www.autodesk.com/autocad-blocks 8
Dynamic Blocks in AutoCAD: Part 1

Figure 8: Creating a
stretch action for a
desk

19. Open a new drawing using any template.

20. Press Ctrl+2 to open the DesignCenter.

21. In the Folder List, navigate to the drawing where you saved the Dynamic Block.
Double-click the drawing and choose the Blocks item.

22. In the content pane of the DesignCenter, double-click the deskset block. In the
Insert dialog box that opens, click OK. Close the DesignCenter.

23. Click anywhere in your drawing to insert the deskset block. Choose Zoom
Extents from the Zoom flyout of the Standard toolbar to display the entire block.

24. Select the block. The stretch action grip is a right-facing arrow. Drag the arrow to
stretch the desk. Click when the desk is the desired length.

Conclusion
Adding dynamic features to a block greatly increases the flexibility and usefulness of the
block. Take some time to think about how you could use this feature for your blocks and
then start creating some Dynamic Blocks!

Autodesk, AutoCAD and DesignCenter are registered trademarks of Autodesk, Inc., in the About the Author
USA and other countries. All other brand names, product names, or trademarks belong to
their respective holders. Autodesk reserves the right to alter product offerings and Ellen Finkelstein has been
specifications at any time without notice, and is not responsible for typographical or graphical
errors that may appear in this document.
using AutoCAD since 1986.
She is author of AutoCAD
© 2005 Autodesk, Inc. All rights reserved. 2006 and AutoCAD 2006 LT
Bible.

www.autodesk.com/autocad-blocks 9
AutoCAD®
2006

Dynamic Blocks in AutoCAD


Part 2 of 3: Inventory of Block Editor,
Commands, Parameters, Actions, and
Parameter Sets.
CONTENTS
This second of three white papers on Dynamic
Capabilities of
Blocks in AutoCAD® 2006 documents the Dynamic Blocks .......2

software’s parameters, actions, and parameter Review of the Block


Editor.........................2
sets so that you can discover how they might best
Using Parameters.....4
apply to your situation.
Using Actions ...........6
Using Parameter Sets
This white paper includes the following: ...................................8
ƒ A brief overview of the capabilities of Dynamic Blocks Easier Done Than
ƒ An explanation of the Block Editor, where you create Dynamic Blocks Explained ................10
ƒ Tables of parameters, actions, and parameter sets, including an explanation of which
parameters and actions you can pair

For those new to Dynamic Blocks, Part 1 of this series presents an overview of Dynamic
Blocks and a quick-start tutorial and can be found at www.autodesk.com-autocad-blocks.
Dynamic Blocks in AutoCAD: Part 2

Capabilities of Dynamic Blocks


It’s hard to list all the capabilities of Dynamic Blocks because you can combine
features to make new ones. But a basic list can help you decide how you could
benefit from using Dynamic Blocks. When you start to create Dynamic Blocks,
you can also use this list to determine which features to add to each block. Each
of these actions can apply independently to any component within the block. A
Dynamic Block can do the following:

ƒ Move based on a point, linear distance, polar distance (both a distance


and an angle), or XY distance (distances along X and Y axes)
ƒ Scale based on a linear distance, polar distance, or XY distance
ƒ Stretch based on a point, linear distance, polar distance, or XY distance
ƒ Rotate
ƒ Stretch and rotate (polar stretch)
ƒ Align (the entire block) to existing objects
ƒ Flip along an axis (like the Mirror command)
ƒ Array based on a linear distance, polar distance, or XY distance
ƒ Take a value from a lookup table
ƒ Become visible or invisible

Important additional features are the ability to connect changes, so that changing
one component automatically changes another one; set a multiplier so that one
object moves or stretches a percentage factor of another object; and specify
which grips can be used as insertion base points.

As you can see, Dynamic Blocks offer many capabilities, enabling you to create
blocks that are intelligent and flexible, yet easy to control. Instead of separately
changing numerous components of a block, you can maintain the integrity of the
block while modifying it within specific constraints.

Review of the Block Editor


You create Dynamic Blocks in the Block Editor. To start the Block Editor, choose Block
Editor on the Standard toolbar, or type bedit on the command line. You then see
the Edit Block Definition dialog box, where you choose to edit either a block or the
entire current drawing. Then click OK to open the Block Editor.

Figure 1: The Edit


Block Definition
dialog.

www.autodesk.com/autocad-blocks 2
Dynamic Blocks in AutoCAD: Part 2

The Block Editor is a window and mode separate from the drawing area. You can execute
most commands from within the Block Editor, but not all. However, you can perform all
drawing and editing tasks there. The Block Editor displays all menus and toolbars.

Figure 1: The Edit Block Definition dialog box.

Note: The colored background of the Block Editor indicates that you’re not in the regular Figure 2: Block Editor
drawing area. with the transformer
block open for editing.
Before using the Block Editor, you may find it helpful to familiarize yourself with its toolbar
buttons:

ƒ Edit or Create Block Definition: Opens the Edit Block Definition dialog box,
where you can choose another existing block to edit or enter a name to create a
new block in the Block Editor. Use this button to edit several Dynamic Blocks
(existing or new) without exiting the Block Editor.
ƒ Save Block Definition: Saves the current block.
ƒ Save Block As: Opens the Save Block As dialog box, where you can save the
current block under a new name. Use this procedure to define a new Dynamic
Block based on an existing one.
ƒ Block Definition Name: Lists the block you are currently editing.
ƒ Authoring Palettes: Toggles the display of the Block Authoring Palettes window.
Use this window to place parameters, actions, and parameter sets.
ƒ Parameter: Starts the BPARAMETER command, which enables you to use the
command line (or dynamic input tooltip) to place a parameter. The options are
the same as when you use the Block Authoring Palettes window.
ƒ Action: Starts the BACTION command, which enables you to use the command
line (or dynamic input tooltip) to place an action. The options are the same as
when you use the Block Authoring Palettes window.

www.autodesk.com/autocad-blocks 3
Dynamic Blocks in AutoCAD: Part 2

ƒ Define Attribute: Opens the Attribute Definition dialog box, where you define
attributes for the block.
ƒ Update Parameter and Action Text Size: Sometimes, the parameter and action
text becomes unusually large. When this happens, just click this button, and the
text resizes to normal.
ƒ Learn About Dynamic Blocks: Opens the New Features Workshop, where you
can view a tutorial on Dynamic Blocks.
ƒ Exit Block Editor and Return to Drawing: Closes the Block Editor.
ƒ Visibility Mode: Toggles the BVMODE system variable, which determines how
invisible objects display in the Block Editor. The default value (0) does not display
invisible objects for the current visibility state. If you change the value to 1 (by
clicking the Visibility Mode button), invisible objects are dimmed but still visible.
ƒ Make Visible: Makes selected objects visible for the current visibility state.
ƒ Make Invisible: Makes selected objects invisible for the current visibility state.
ƒ Manage Visibility States: Opens the Visibility States dialog box, where you
name visibility states.
ƒ Visibility States drop-down list: Displays the current visibility state. Choose a
visibility state from this list to change the current visibility state.
Note: Visibility states are discussed in more detail in Part 3 of this series of white papers
on Dynamic Blocks.

When you open the Block Editor, the Block Authoring Palettes window automatically
opens. This window has three tabs:

ƒ Parameters
ƒ Actions
ƒ Parameter Sets
The contents of these tabs are discussed in the rest of this white paper.

Using Parameters
The first step in creating a Dynamic Block is to add a parameter. You can find all the
parameters on the Parameters tab of the Block Authoring Palettes window. A parameter
defines the geometry of the block to which you add a parameter. In each case, you need
to specify geometric points on the block. Usually, you add an action to the parameter to
define how the geometry will change when you edit the Dynamic Block in a drawing.

Parameters and actions pair together in logical ways. For


example, you can stretch geometry along a distance (a linear
parameter), but you can’t rotate geometry along a distance.
Therefore, each parameter takes only certain actions. The Figure 3: The
following table explains each parameter and which actions they Parameters tab of the
can take. Block Authoring
Palettes window.

www.autodesk.com/autocad-blocks 4
Dynamic Blocks in AutoCAD: Part 2

Parameter Applicable Description


Actions
Point Move, Defines a point (XY coordinate) on the geometry. Move
Stretch or stretch from that point.
Linear Move, Defines a linear distance. Specify a start point and an
Scale, endpoint. Move, scale, stretch, or array along the line
Stretch, between the two points.
Array
Polar Move, Defines a linear distance and displays an angle. Specify
Scale, a start point and an endpoint. Move, scale, stretch, polar
Stretch, stretch (stretch at an angle), or array along the line
Polar between two points and at a specified angle.
Stretch,
Array
XY Move, Defines X and Y distances. Specify a start point and an
Scale, endpoint at an angle, and the parameter separately
Stretch, labels the X and Y distances. Move, scale, stretch, or
Array array at specified X and Y distance.
Rotation Rotate Defines a base point, radius, and default rotation angle.
Rotate around the base point.
Alignment None Defines a tangent or perpendicular alignment point.
Specify the type (tangent or perpendicular) and the
direction. No action is required. An alignment parameter
aligns the entire block with other objects, enabling you to
“snap” the block into place at the appropriate alignment.
Flip Flip Defines a reflection line. Specify the base point and
endpoint of the line. Flipping is like mirroring.
Visibility None Controls the visibility of components in the block. No
action is required, but you need to define the visibility
states and which components are visible or invisible in
each state.
Lookup Lookup Defines preset values that you specify. You then create
labels for each value. When you edit the block in a
drawing, choose one of the labels from the list to modify
the block according to the values.
Base Point None Defines a base point for the Dynamic Block. Use this
parameter when you want a base point to maintain its
relationship to the block as other parts of the block are
modified. For example, use a base point parameter if you
want the base point of the block to always remain at the
lower-left corner of a rectangle, even if that corner is
stretched to a new position.

Note: Visibility states, lookup parameters, and many specific uses for these parameters
are discussed more in detail in Part 3 of this set of white papers on Dynamic Blocks.

www.autodesk.com/autocad-blocks 5
Dynamic Blocks in AutoCAD: Part 2

For example, you can attach an array action to an XY parameter. In Figure 4, the row and
column distances are defined to be one unit larger than the stepping-stone, so that there
are spaces between the stones when they are arrayed. If you know the X and Y distances
that need to be covered with stepping-stones, you can easily array the stones to cover the
area.

Figure 4: Arraying
stepping-stones. The
block contains one
stepping-stone with an
XY parameter and an
array action.

Using Actions
All actions are attached to a parameter. First, you add a parameter to a block, and then
you add an action to the parameter.

Figure 5: The Actions


tab of the Block
Authoring Palettes
window.

www.autodesk.com/autocad-blocks 6
Dynamic Blocks in AutoCAD: Part 2

Actions are similar to the commands on the Modify toolbar. They define the way objects
within the dynamic block change when you edit the block in a drawing. Actions need to
match up with an appropriate parameter. The following table explains each action and its
appropriate parameters.

Action Appropriate Description


Parameters
Move Point, Linear, Moves objects from a point, along a line, along a line with a
Polar, XY displayed angle, or by specified X and Y units.
Scale Linear, Polar, Scales objects by specifying a length, a length and an
XY angle, or X and Y distances.
Stretch Point, Linear, Stretches objects based on a point, a length, a length and
Polar, XY angle, or X and Y distances.
Polar Polar Stretches objects and enables you to rotate them as well.
Stretch You can rotate some objects while leaving others
unchanged.
Rotate Rotation Rotates objects around a base point as you drag a second
point (the endpoint of the parameter’s radius).
Flip Flip Flips (mirrors) objects along a reflection line.
Array Linear, Polar, Arrays objects by specifying a length, a length and an
XY angle, or X and Y distances.
Lookup Lookup Sets values according to a table that you specify (using the
Reverse Lookup feature). When editing, you choose one of
the values from a drop-down list.

The door shown in Figure 6 has many capabilities, including two flip parameters and
corresponding flip actions. (You can stretch it, set the opening angle, and change the wall
thickness.)

Figure 6: This door


can flip both
horizontally and
vertically

Flip parameters

www.autodesk.com/autocad-blocks 7
Dynamic Blocks in AutoCAD: Part 2

By flipping horizontally (across the vertical reflection line), you can insert a door that opens
from the left or from the right. By flipping vertically (across the horizontal reflection line),
you can insert a door that opens inward or outward.

Figure 7: The two flip


parameters and
actions offer four
permutations for the
direction of the door’s
opening

Using Parameter Sets


The final tab on the Block Authoring Palettes window contains parameter sets. Parameter
sets are preset pairings of parameters and actions. Parameter sets are useful when you
are learning about Dynamic Blocks but also offer a way to reduce their development time.

The Parameter Sets tab is so long that it doesn’t fit on the screen; you need to scroll down
to see all the sets.

To see what the set contains, place the cursor over any parameter set to see a tooltip
explaining the set’s functioning.

When you place a parameter set, you still need to respond to the
parameter prompts by specifying one or more points and placing
the label. An exclamation point appears next to the action to
indicate that you still need to select objects for the action.
Double-click the action to display prompts for selecting objects.

Figure 8: The
Parameter Sets tab of
the Block Authoring
Palettes window.

www.autodesk.com/autocad-blocks 8
Dynamic Blocks in AutoCAD: Part 2

Name Description
Point Move A point parameter with a move action
Linear Move A linear parameter with one grip and a move action at the endpoint
Linear A linear parameter with one grip and a stretch action at the endpoint
Stretch
Linear Array A linear parameter with one grip and an array action at the endpoint
Linear Move A linear parameter with two grips and a move action at both the start
Pair point and endpoint
Linear A linear parameter with two grips and a stretch action at both the start
Stretch Pair point and endpoint
Polar Move A polar parameter with one grip and a move action at the endpoint
Polar A polar parameter with one grip and a stretch action at the endpoint
Stretch
Polar Array A polar parameter with one grip and an array action at the endpoint
Polar Move A polar parameter with two grips and move actions at both the start
Pair point and endpoint
Polar A polar parameter with two grips and stretch actions at both the start
Stretch Pair point and endpoint
XY Move An XY parameter with one grip and a move action at the endpoint
XY Move An XY parameter with two grips and move actions at both the start point
Pair and endpoint
XY Move An XY parameter with four grips and move actions at all four
Box Set coordinates defined by the start point and endpoint
XY Stretch An XY parameter with four grips and stretch actions at all four
Box Set coordinates defined by the start point and endpoint. Use this parameter
set to create a rectangular block that you can stretch from any corner,
without changing the shape of the block.
XY Array An XY parameter with four grips and array actions at all four
Box Set coordinates defined by the start point and endpoint
Rotation Set A rotation parameter and rotation action
Flip Set A flip parameter and flip action
Visibility Set A visibility parameter
Lookup Set A lookup parameter and lookup action

Figure 9: A rectangular
block with an XY
Stretch Box parameter
set, as shown in the
Block Editor.

www.autodesk.com/autocad-blocks 9
Dynamic Blocks in AutoCAD: Part 2

Figure 10: Stretching


the rectangular block.
You can stretch it from
any corner.

Easier Done Than Explained


Although Dynamic Blocks have some complexities, many of the most commonly used
parameters and actions are easy to create and use. The lists in this white paper may
seem long, but after you’ve created a simple Dynamic Block or two, you’ll find a great deal
of commonality among the various parameters and actions. The best advice is to start
simple, and soon you’ll have some very useful Dynamic Blocks.

Autodesk, AutoCAD and DesignCenter are registered trademarks of Autodesk, Inc., in the About the Author
USA and other countries. All other brand names, product names, or trademarks belong to
their respective holders. Autodesk reserves the right to alter product offerings and
Ellen Finkelstein has been
specifications at any time without notice, and is not responsible for typographical or graphical using AutoCAD since 1986.
errors that may appear in this document.
She is author of AutoCAD
© 2005 Autodesk, Inc. All rights reserved.
2006 and AutoCAD 2006 LT
Bible.

www.autodesk.com/autocad-blocks 10
AutoCAD®
2006

Dynamic Blocks in AutoCAD


Part 3 of 3: Advanced Features of
Dynamic Blocks.
CONTENTS
This is the third of three white papers on Dynamic
Blocks in AutoCAD® 2006 software. This white Naming Parameters
and Actions............... 2
paper introduces some of the special techniques Selecting Objects for
Actions ...................... 3
and advanced features that you can use to make
Specifying Stretch
complex Dynamic Blocks. Frames ...................... 4
The first white paper explained Dynamic Block basics and included a quick-start tutorial. Cycling Through
The second white paper documented the parameters, actions, and parameter sets Insertion Points ........ 5
available for creating Dynamic Blocks. If you’re new to Dynamic Blocks, first read Parts 1
Changing the
and 2. Direction of
an Action................... 5
Keeping Objects
Centered.................... 6

Stretching a Block
Equally in Opposite
Directions.................. 7

Chaining Parameters
................................... 8

Using Visibility States


................................. 10

Using Lookup
Parameters
and Tables .............. 12

Conclusion.............. 14

1
Dynamic Blocks in AutoCAD: Part 3

Naming Parameters and Actions


Parameters have a label that appears when you edit the block in the Block Editor. By
default, the label is generic, and if you create more than one of the same parameter, they
are numbered consecutively. For example, if you create two linear parameters, they are
labeled Distance and Distance1. To help make your labels more meaningful, you can, and
probably should, change them. If your linear parameter measures the width of a door, you
could change the label to Door Width.

To change a parameter label, use the Label option at the first parameter prompt when you
create the parameter. Or, you can create the parameter with the default label, select the
parameter, and change the label in the Properties palette.

Note that parameters also have a name, which doesn’t appear in the Block Editor and
simply denotes the type of parameter. For example, if you create a linear parameter, its
name is Linear. If you create a second linear parameter, its name is Linear1. Although you
can change a parameter name in the Properties palette, it’s probably best not to do so,
because these names can help you understand the type of parameter you’ve used when
creating the Dynamic Block.

Figure 1: A
parameter has
both a name and
a label.

Actions have names only (no labels), and you may want to change these to make them
more meaningful. If you create more than one of the same action type, they are also
numbered consecutively (for example, Stretch and Stretch1) as needed. If your stretch
action changes the width of the door, you could change the action name to Stretch Door.

Figure 2: The linear


parameter’s label is
Door Width. Two
actions are named
Stretch Door and
Scale Door Swing.

www.autodesk.com/autocad-blocks 2
Dynamic Blocks in AutoCAD: Part 3

Actions also have a type (such as Stretch). The action type appears in the Properties
palette, but you can’t change it.

Selecting Objects for Actions


When you add an action to a parameter, you must select objects to create a selection set
for the action. Often, you want to select not only drawing geometry, but the parameter as
well. In fact, sometimes, you need to select other parameters on other objects to get the
results you want.

For example, let’s say that you have a desk with a linear parameter and a stretch action
so that you can stretch the width of the desk. You want to be able to move the chair
independently (so it has a point parameter and a move action), but you also want it to
move to the right when you stretch the desk to the right. To accomplish this, when you
select objects for the desk’s stretch action, you need to include the chair and its point
parameter. Therefore, you need to create the parameter for the chair before you create
the stretch action for the desk. In general, if you want to include another object in an
action that has a parameter of its own, you should create the two parameters first, before
adding the first action.

Figure 3: Create
different results by
changing the selection
set for the desk’s
stretch action.

www.autodesk.com/autocad-blocks 3
Dynamic Blocks in AutoCAD: Part 3

A common use for including a second parameter in the selection set of an action is for a
base parameter. Use a base parameter if you want the base point of the block reference
to remain in the same position relative to the block, for example, at the lower-left corner of
a rectangle, even when that position moves. If an action (such as stretch or move) moves
that lower-left corner, then you should include the base parameter in the selection set of
that action, along with its parameter. Then the base point of the block always remains in
its proper location when you edit the block in a drawing.

Specifying Stretch Frames


Stretch actions require you to specify a stretch frame before selecting objects. The
purpose of the stretch frame is not always obvious at first. This stretch frame specifies that
part of geometry that is included in the action. You can specify it with a selection or
crossing window. Then you can select objects with a crossing window or by picking the
objects. Often these two windows are similar (although they need to use slightly different
points). The following example shows the result of two different stretch frames while
stretching a rectangle in a drawing. In Figure 5, the stretch frame includes only the upper-
right corner of a rectangle, so only that corner stretches. In Figure 6, the stretch frame
includes the entire right side so the entire side stretches.

Figure 5: Upper-right
corner included in
stretch frame

Figure 6: Entire right


side of rectangle
included in stretch
frame.

www.autodesk.com/autocad-blocks 4
Dynamic Blocks in AutoCAD: Part 3

Cycling Through Insertion Points


If your block has several actions, or alignment or base point parameters (which require no
action), the block has several grips. You can cycle through these grips when you insert the
Dynamic Block by pressing the Ctrl key.

Figure 7: Pressing the


Ctrl key while inserting
the block moves the
insertion point from
grip to grip, although
the cursor position
does not change.

By default, insertion cycling is on. You can turn it off for any grip by selecting just the grip
and changing the Cycling property in the Properties palette to No. You can also use the
BCYCLEORDER command in the Block Editor to change the cycling order of the grips in
the Insertion Cycling Order dialog box.

Changing the Direction of an Action


For move, stretch, and polar stretch actions, you can change the direction of an action
relative to its parameter. For example, you may want to drag to the right but make an
object stretch vertically at a 90-degree angle. This is called an angle offset. A common
use is a door block that you stretch to the right to change the width of the door opening.
The door itself should vertically stretch the same amount, and the arc swing should scale
at the same time. Note that if you just scaled the entire door, the door itself would get
thicker as you widened the door opening—a result that you don’t want.

Figure 8: Left, door in


Block Editor. Right,
editing the door in a
drawing.

www.autodesk.com/autocad-blocks 5
Dynamic Blocks in AutoCAD: Part 3

To create this angle offset, you author the Dynamic Block shown in the figure as follows:
1. Create the door by drawing a rectangle and an arc. Make a block from these objects,
and use the lower-left corner of the door as the base point.
2. Open the Block Editor, and select the door to edit.
3. Create a linear parameter as shown on the left side of the figure, to represent the
door width. Select the parameter, right-click it, and choose Grip Display>1 to show
only a grip on the right end of the parameter.
4. Add a stretch action to the linear parameter. For the stretch frame, specify a window
that covers the top part of the rectangle. When you select objects, select everything
except the arc.
5. Select the stretch action. In the Properties palette, change its Angle Offset value to
90.
6. Add a scale action to the linear parameter, and select the arc.
7. Save the block and close the Block Editor. When you grip-edit the block, click the
stretch grip to change the door opening. The door stretches in the 90-degree direction
and the arc scales correspondingly.

You can also create the angle offset while creating the action. At the Specify Action
Location or [Multiplier/Offset] prompt, use the Offset option and set its value to 90.

Keeping Objects Centered


Many blocks have centered components that need to remain centered as you stretch the
entire block. For example, the valve part in the following figure may come in several
diameters, but the hole must always be centered.

Figure 9: This valve


part’s central hole
needs to remain
centered regardless of
the diameter of the
entire part.

To keep a component centered, you use a distance multiplier of 0.5, so that the
component always moves half the distance of the rest of the block. In this example, you
can use a stretch action to change the diameter (a linear parameter) of the entire block.
The two vertical lines in the middle (the central hole) have a move action attached to the
same linear parameter, with a distance multiplier of 0.5.

To create a distance multiplier, you add an action as usual. After the prompt to select
objects, you see the Specify Action Location or [Multiplier/Offset] prompt. Use the
Multiplier option to specify the distance multiplier. You can also change the multiplier
afterward by selecting the action and using the Properties palette.

www.autodesk.com/autocad-blocks 6
Dynamic Blocks in AutoCAD: Part 3

Stretching a Block Equally in Opposite Directions


Another way of handling the previous example would be to stretch the two sides and leave
the middle alone. Some blocks always need to remain symmetrical, so if you stretch one
side, the other side needs to stretch an equal amount.

Figure 10: An I-beam


in the Block Editor.

The I-beam has a linear parameter and two stretch actions, both attached to the same grip
point on the right side of the parameter. Because you don’t need the grip on the left, select
the parameter, right-click it, and choose Grip Display>1. The Stretch Left action’s angle
offset is 180 degrees. A base point parameter at the upper-left corner, which is included in
the selection set of the Stretch Left action, keeps the base point at that corner, even when
that corner moves in the stretching action. As you drag the rectangular grip in a drawing,
both sides of the I-beam stretch by the same amount.

Figure 11: Stretching


the I-beam in a
drawing.

www.autodesk.com/autocad-blocks 7
Dynamic Blocks in AutoCAD: Part 3

Chaining Parameters
Sometimes, you need one action to cause another action to occur. If those two actions
can share a parameter grip, then you can accomplish this easily. For example, the door
shown in “Changing the Direction of an Action” earlier in this document has two actions: a
scale action that scales the arc and a stretch action that stretches the door. Because
these two actions can share one parameter and grip, when you stretch the door, you also
scale the arc.

However, sometimes your geometry is more complex and you need more than one
parameter. Yet you still want one action to activate another action. You do this using the
chaining feature. Because you want one action to activate another one, you need two
actions and two parameters. The principles of chaining are as follows:

ƒ Parameter 1 has an action, whose selection set includes parameter 2, in addition


to any other objects it needs to function. (Note: If the action is a stretch action,
the stretch frame also needs to include parameter 2.)
ƒ Parameter 2 has an action; parameter 2’s chaining property is set to Yes.

When you grip-edit the block using the action of parameter 1, the action of parameter 2 is
activated at the same time.

You need to set up chaining in a logical order:


1. Decide which action you want to grip-edit. This is the action that will activate another
action. You can call it the main action.
2. Decide on the parameters you need and their actions.
3. Create the parameters first.
4. Create the main action and attach it to its parameter (parameter 1).
5. When you specify the main action’s selection set, be sure to include the parameter of
the second action. (Don’t include the objects that are in the selection set of the
second action.)
6. Create the action for parameter 2.
7. Set the chaining property of parameter 2 to Yes.

Tip: Because parameter 2’s action is automatically activated, it doesn’t need any grips. To
avoid confusion during editing, you can remove all its grips. Select it, right-click it, and
choose Grip Display>0.

www.autodesk.com/autocad-blocks 8
Dynamic Blocks in AutoCAD: Part 3

In the following example, you want to stretch the cut-out sheet metal plate and create an
array from the small circle (the cutout) at the same time. You want the circles to have 0.5
units between them, and you also want to maintain equal spacing at either end of
the plate.

Figure 12: A cut-out


sheet metal plate. (The
dimensions aren’t part
of the block.)

Figure 13: The block in


the Block Editor.

The stretch action is the main action that you want to be able to grip-edit. As you stretch to
lengthen the plate, you want the circle to create an array. Here’s how to set up this block:

1. Create the block, and open it in the Block Editor.


2. Add a linear parameter (parameter 1), called Straight Length, along the straight part
of the object. (The plate is a polyline.) In the example, this parameter is 2 units long
and has an increment value set with an increment of 2.5, a minimum of 2, and a
maximum of 20. Set the grip display to 1.
3. Add a second linear parameter (parameter 2), called Array Length. This parameter is
2.5 units long.
4. Create the stretch action for the Straight Length parameter. When you specify the
stretch frame, include the entire Array Length parameter. When you select objects,
again include the Array Length parameter, but not the circle. (Because the Array
Length parameter is inside the circle, if you use a crossing window, you need to
include the circle in the crossing window and then use the Remove option to deselect
the circle. Another method is to just select the Array Length parameter.) Set the grip
display to 0 and the Chain Actions property to Yes.
5. Create the array action for the Array Length parameter. In the example, the column
offset is 2.5 units.
6. Save the block, and close the Block Editor.

www.autodesk.com/autocad-blocks 9
Dynamic Blocks in AutoCAD: Part 3

When you grip-edit the block in the drawing, you see only one grip, so you don’t have to
remember which grip to stretch.

Figure 14: Stretching


the block in the
drawing also creates
an array from the
circle.

Figure 15: The block is


now stretched and the
As you drag parameter 1 a specific distance and angle, parameter 2 moves the same circles are arrayed.
distance and angle. For this reason, chaining is useful when you want to maintain a
constant relationship between two components in a block. In the example, the relationship
between the circles and the ends of the plate stays the same, so that the circles are
always centered inside the plate.

Using Visibility States


A visibility parameter turns the visibility of a block component on and off. The visibility
parameter doesn’t take an action. A Dynamic Block can have only one visibility parameter.

You define visibility states, each of which is a variation of visibility or invisibility. You can
make one or more components visible or invisible. In the following figure, all the resistor
variations are one Dynamic Block. The components that are different are specified as
visible or invisible for each of five visibility states. You’ve just combined five blocks into
one!

Figure 16: Fixed value,


variable, adjustable,
temperature variable,
and photo resistors—
visibility variations of
one block.

www.autodesk.com/autocad-blocks 10
Dynamic Blocks in AutoCAD: Part 3

You can use visibility states to switch among objects. For example, you might want to
have two variations of a telephone on a desk—a single-line phone and a multiline phone.
By putting these two phones in the same location and setting two visibility states, you can
choose which phone to display when you edit the block.

Figure 17: These two


phones are in the
same location in the
block, one on top of
the other. You can
choose which to
display using the
visibility parameter
.

To add a visibility parameter, follow these steps:


1. Create a block that contains all the components that you need for all the visibility
states.
2. In the Block Editor, choose Visibility Parameter from the Parameters tab of the Block
Authoring palettes, and place it near the items you want to make visible or invisible.
3. Choose Manage Visibility States from the Block Editor toolbar (or double-click the
visibility parameter) to open the Visibility States dialog box.

Figure 18: The


Visibility States dialog
box, after entering
some visibility states.

4. Click the default visibility state, called VisibilityState0. Type the name of your first
visibility state, and press Enter.
5. Click New to open the New Visibility State dialog box. Enter the second visibility state
name, and click OK. Repeat for all the visibility states that you want to create.
6. Click OK to close the Visibility States dialog box. (The visibility state at the top of the
list will be the default state when you insert the block. You can choose a visibility state
and use the Move Up button to move it to the top of the list.)
7. Choose the first visibility state from the Visibility States drop-down list at the right side
of the Block Editor toolbar. Select all the components that you want to be invisible for
that state. Click the Make Invisible button on the Block Editor toolbar.
8. Repeat the previous step for each state. You can also select objects and make them
visible by clicking the Make Visible button. If you need to select an object that is
invisible, click the Visibility Mode button, which displays invisible objects in gray so
you can see and select them.

www.autodesk.com/autocad-blocks 11
Dynamic Blocks in AutoCAD: Part 3

When you’re done, select each state from the drop-down list and check that it displays the
correct objects. Save the block, and close the Block Editor.

When you select the Dynamic Block in the drawing, click the down arrow to display the list
of visibility states. Select a state to display it.

Figure 19: Choosing a


visibility state in a
drawing.

Visibility states are a powerful, yet simple way to add great flexibility to a block.

Using Lookup Parameters and Tables


A lookup parameter pairs with a lookup action to create a table that matches labels with
values. Lookup tables are great when you want preset sizes for a block. For example, you
might have a part that comes in three sizes. When you insert and grip-edit the block, you
just choose a size from a drop-down list.

Figure 20: Choosing a


desk length from a
lookup table.

The lookup parameter and action are based on another parameter and action, such as a
linear parameter and stretch action. You may want to create a value set to preset the
values that you can use in the lookup table, but you can also set the values when you
create the lookup table.

Here’s how to create a lookup parameter and action:


1. In the Block Editor, add the parameter and action that you want to use as the
basis for the lookup parameter and action. The preceding example uses a linear
parameter and a stretch action. If you add a value set (list or increment), the
measurements are available when you create the lookup table.
2. From the Parameters tab of the Block Authoring palettes, add a lookup
parameter.
3. From the Actions tab, add a lookup action. The Property Lookup Table dialog box
opens.
4. Click the Add Properties button, choose the parameter you want to work with,
and click OK. You’re back in the Property Lookup Table dialog box.

www.autodesk.com/autocad-blocks 12
Dynamic Blocks in AutoCAD: Part 3

Figure 21: The


completed Property
Lookup Table dialog
box.

5. If you have values from a value set, click the first row of the Input Properties side
and click the drop-down arrow that appears. Choose the first value. Otherwise,
just enter values on each row. Click the corresponding row on the Lookup
Properties side, and enter the label that you want for that value.
6. Click the lower-right cell in the dialog box, which says Read Only by default.
Choose Allow Reverse Lookup. For this to work, all rows in the table must be
unique. Use this option in order to choose a value from a drop-down list when
you insert the block.
7. Click OK.
8. Save the block, and close the Block Editor.

Now, when you grip-edit the block, you’ll see a down arrow. Click the arrow to choose one
of the labels and apply its corresponding value to the block.

Tip: You can extract parameter values like attributes. For example, if you choose a desk
length of 7 feet, you can extract that value. You can also create invisible values that you
can extract using a lookup table. To do so, add a lookup parameter and action. Change
the label of the parameter to the property (like an attribute tag) that you want. For
example, you could label the parameter “Chair Color.” In the Property Lookup Table dialog
box, add the colors on the Lookup Properties side, leaving the Input Properties side blank.
In the drawing, you can choose a chair color by clicking the lookup parameter’s down
arrow. You don’t see any change in your drawing, but when you extract attributes, the
color appears in the output.

www.autodesk.com/autocad-blocks 13
Dynamic Blocks in AutoCAD: Part 3

Conclusion
Dynamic Blocks in AutoCAD 2006 software give you more control over your blocks,
helping you increase efficiency and get the job done faster. Dynamic Blocks enable you to
reduce the size of your block libraries while giving you more block options that are easier
to access, manipulate, and place. The advanced features detailed in this white paper help
to ensure that when you create blocks, you can place and manipulate correctly the first
time—and be more efficient every time.

Autodesk and AutoCAD are registered trademarks of Autodesk, Inc., in the USA and other About the Author
countries. All other brand names, product names, or trademarks belong to their respective
holders. Autodesk reserves the right to alter product offerings and specifications at any time Ellen Finkelstein has been
without notice, and is not responsible for typographical or graphical errors that may appear in using AutoCAD since 1986.
this document.
She is author of AutoCAD

© 2005 Autodesk, Inc. All rights reserved.


2006 and AutoCAD 2006 LT
Bible.

www.autodesk.com/autocad-blocks 14

You might also like