Categories

AutoCAD 2015 and AutoCAD LT 2015 Bible

The most comprehensive AutoCAD book around!

Chain dynamic blocks in AutoCAD

Dynamic blocks, introduced in AutoCAD 2006, are very powerful, but sometimes they can get complicated. One of the more involved features of dynamic blocks is chaining. In this tip, I try to make chaining easy.

Sometimes, you want one action to execute a second action at the same time. If the relationship between the two actions is simple and direct, you can accomplish this easily — without chaining. You just attach two actions to the same grip on the same parameter. When you grip-edit one action, the other happens at the same time.

For example, in this desk set, the desk has a linear parameter and a stretch action attached to the right grip of the parameter. The top-right chair has a move action attached to the same grip. The bottom chair also has a move action attached to that same grip, but the distance multiplier is set to 0.5.

So when you stretch the desk, the top chair moves the same distance, always remaining lined up with the right side of the desk. The bottom chair moves half the distance, always remaining centered behind the desk.

But, your geometry may require more than one parameter.  To activate one action with another in this situation, you use the chaining feature. Note that the secondary parameter, the one whose action will be activated by the primary action, must be a point, linear, polar, XY, or rotation parameter. There are some other limitations, too, but they’re hard to explain, so just experiment.

Remember that you want one action (with its parameter) to activate another action, also with a parameter. So you need two actions and two parameters. Create a chained parameter as follows:

  1. Create the block and open it in the Block Editor.
  2. Decide on the parameters you’ll need and their actions.
  3. Decide which action you’ll grip-edit in the drawing. This is the primary action that will activate the other, secondary, action.
  4. Create both parameters first, before creating any actions.
  5. Create the primary action and attach it to its parameter (the primary parameter).
  6. When you specify the objects for the primary action, include the parameter of the secondary action. This is very important. But don’t include the objects that will be in the selection set of the secondary action.
  7. Create the secondary action, attach it to its parameter, and select its objects.
  8. Select the secondary parameter, open the Properties palette, and set its chaining property to Yes.

To summarize, the basic principles of chaining are as follows:

  • The primary parameter has an action whose selection set includes the secondary parameter in addition to any other objects it will act on. (If the action is a stretch action, the stretch frame also needs to include the secondary parameter.)
  • The secondary parameter’s chaining property is set to Yes.

Save your block, close the Block Editor and try out your chained dynamic block. When you grip-edit the primary action, the secondary action will be activated at the same time.

As you drag the primary parameter’s grip, the secondary parameter’s grip moves in response to the result of the primary action. For this reason, chaining is useful when you want to maintain a constant relationship between two components in a block.

In this cover, the handle needs to stay the same distance from the top of the cover. The cover comes in three sizes (the linear parameter has a value set) and has a stretch action. As the cover is scaled, the handle moves up.

Note: Once you’ve perfected your block, you can remove the grips from the secondary parameter, because you don’t need them. In the Block Editor, select the secondary parameter, right-click it, and choose Grip Display > 0.

The move action is attached to the top grip of its linear parameter. As the cover is scaled, this parameter (the secondary parameter) moves up, thereby moving the handle.

Ellen Finkelstein

7 comments to Chain dynamic blocks in AutoCAD

  • Tyler Donnelly

    I am new to AutoCAD, and am even newer to dynamic blocks.

    I am trying to use a chain dynamic block with several attributes that will rotate, the attributes will stay in their correct position in the block, and will keep a horizontal orientation.

    Any advice?

  • tony

    Tyler, in case you still have not received an answer use the move parameter and pick the attribute then goto properties of the move parameter and make it chained. Then you can add your rotate parameter then when picking items to rotate pick the move parameter but not the actual objects you want to move.

  • filip apostolopoulos

    Autocad 2007

    I have a Dynamic Block with an attribute (which is a door), When i move the grip which is associated to the width of the door, the width is changed but the attribute value isn’t updated unless you type ” REGEN ” or ” SAVE ” the file. Is there a way to ” REGEN ” the file automaticaly when you move the grips?
    Also, when i insert the block and the current layer has a linetype “HIDDEN” the
    atrribute value (the width of the door) is placed to the axes origin (0,0,0).

  • Duncan

    I’m trying the above method for a complex dynamic block. Simply put, it isn’t working. Basically, I need to array multiple lines, so they appear as the block is stretched, rather than all at once.The above method seems to stretch the parameter but doesn’t do anything to the array I’m forcing it to produce, it simply will not draw.

    Do you have any tips on getting arrays to work with this method?

  • Twine of thoughts

    It was really helpful and gave me the idea behind it!

  • Helen

    Hi,

    I’m trying to do it but when i choose the chain option for the second parameter i got a message ”Error object deleted”. The result it is that it associates the two grips but th e2nd object ( 2nd parameter) doesn’t move.
    Any idea?

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>