AutoCAD 2006 for CAD Managers, Part 413 Jul, 2005 By: Robert Green
Getting a handle on those new dynamic blocks
I'm sure that every CAD manager who has ever used AutoCAD has created a block or two. Dynamic blocks have the features of traditional blocks we've come to know plus some new capabilities you'll want to tap.
The primary benefits of dynamic blocks include the following:
- Multiple geometric blocks can now be represented with a single dynamic block. Example: Rather than drawing every size door you'll ever need in right- and left-hand versions, you create a single dynamic block that contains sizing and mirroring actions that allow it to scale, rotate and mirror accordingly.
- Block libraries can be greatly simplified because one dynamic block can take the place of many conventional blocks.
- Tool palettes and Design Center interfaces are also simplified thanks to reduced block counts.
What Hasn't Changed?
First you should understand that the process of creating a dynamic block starts out the same as for a standard block. Those steps are:
Create geometric content. Dynamic blocks are drawn using AutoCAD commands, just as always. You add entities — parameters and actions — to the block after you've drawn the geometry. We'll talk about those shortly.
Insertion point. Dynamic blocks still have a point of reference embedded into them during block creation.
Layer handling. Dynamic blocks created on layer 0 still take on the properties of the layers where you insert them, while blocks created on other layers retain their original, layering characteristics.
Attributes. You may still add attribute definitions to dynamic blocks just as you would to normal blocks.
Deployment. You still insert blocks using the -Insert or Ddinsert command or via graphical interfaces such as Design Center, tool palettes and menu macros embedded in toolbars. Dynamic blocks also support drag-and-drop insertion from Windows Explorer.
Wblock. You can save dynamic blocks to DWG files and insert them in other drawings, just as always.
AutoCAD versions. AutoCAD 2006 dynamic blocks inserted into an AutoCAD 2004 or 2005 session will be treated like any other block insertion — with the dynamic properties ignored. AutoCAD 2002 and prior versions cannot process dynamic blocks because they can't interpret the AutoCAD 2006 DWG format.
What is New?
The list of new dynamic block functionalities is long, but we can group the various new functions into concepts that allow us to explain everything reasonably quickly. So before you jump into creating and editing dynamic blocks, take some time to read through the overview I'll present here. I promise that the time you take to comprehend the dynamic blocks framework will greatly reduce your learning curve.
Dynamic Indicators. You'll notice that the demonstration blocks inserted from tool palettes in AutoCAD 2006 have a lightning bolt in their iconic representation to indicate their dynamic status (figure 1). Icons for blocks that have no dynamic entities in their definitions do not display the lightning bolt, thus allowing you to identify dynamic blocks visually.
Figure 1. Icons for dynamic blocks display a lightning bolt to help you easily identify their dynamic nature.
Block editor. The Bedit command is now used to make edits to blocks. Bedit allows the direct editing of blocks similar to in-place reference editing, but also brings in a dedicated palette of block-editing functions. In many ways the Bedit command is like a mini-CAD system unto itself, with a new set of commands you'll need to learn.
Parameters and actions. When editing a block in the block editor environment, you'll be able to add parameters to your geometry, then attach actions to the parameters to make your blocks dynamic. Using parameters and actions is actually very much like constraining a 2D profile in a parametric mechanical CAD package. Those of you who've used Mechanical Desktop, Inventor, SolidWorks or Pro/ENGINEER will feel comfortable relatively quickly, while those of you who've never worked with a parametric system may be a little flummoxed at first.
To gain some initial experience, let's try the following basic exercise.
1. Open AutoCAD 2006, turn on the Tool Palettes window and navigate to the Mechanical tab (figure 2).
Figure 2. Navigating to the Mechanical Tool Palette tab in AutoCAD 2006.
2. Now drag and drop a hex socket bolt from the tool palette onto your screen. Note that you weren't asked for any insertion or scaling parameters!
3. Click the inserted hex socket bolt to activate its grips. Note that you have more gripping features than you'd expect (figure 3). In the center of the block is a standard AutoCAD grip you can use to drag/move the block, but the other two gripping objects do not have a standard grip look to them because they are new dynamic block grips.
Figure 3. Blocks now contain more gripping features than were previously available.
4. Take a few minutes to select the new dynamic grips and see how you can stretch the bolt to new lengths and even select from a drop-down list of standardized bolts. You should now start to appreciate how many standard blocks are being replaced by this single dynamic block!
5. Enter the Bedit command and select the hex socket bolt for editing (figure 4).
Figure 4. Editing a dynamic block.
6. Click the OK button to enter the Block Editor. Now you'll be able to see the various parameters and actions that were used to build the dynamic block (figure 5).
Figure 5. Displaying the parameters and actions used to build a dynamic block.
7. Double-click on the Lookup Action icon and you'll see how the drop-down box containing bolts of various sizes was implemented (figure 6).
Figure 6. Double-clicking on the Lookup Action icon.
8. Now single-click on the Stretch B icon, and you'll see gripping points that describe how the stretching frame is used to control how the geometry stretches (figure 7). Also note that the Linear Parameter B is highlighted so you know which dimension is related to the stretching action.
Figure 7. Gripping points describe the stretching frame used to control how the dynamic block geometry stretches.
9. After you've clicked the Stretch B icon, use the right-click option to expose the properties of the object (figure 8). In this particular case you'll see the properties denote a Stretch Action object. Using this methodology you can begin to understand how the various parameters and actions behave.
Figure 8. Displaying object properties will help you understand parameters and actions.
10. Now close the block editor environment using the Bclose command. You will be asked whether you'd like to save the changes to your block.
Hint: When you try editing a dynamic block, you can rename the block before editing using AutoCAD's Rename command. That way, you'll be working on a renamed copy of a block and won't accidentally corrupt the original block if you make a mistake.
Now Give It a Try
Using what you know now, I recommend trying to create some dynamic blocks of your own. Start out with a simple concept for a dynamic block that doesn't involve too many parameters and actions and work up to more complex blocks as you go. As you create the blocks, add a parameter and action, then save the block and test it. Repeat this procedure until you have the block working the way you think it should.
Working with dynamic blocks is almost like working with a new CAD system at first, so be prepared for a decent learning curve. Try to set aside some time when you can shut the office door and get away from the phone to spend a couple of quality hours with the new dynamic blocks capability. You'll be amazed by what you can do.
I highly recommend taking a tour of the New Features Workshop overview of dynamic blocks found under the Help menu of AutoCAD 2006. Based on an understanding of the topics we've covered in this edition of the CAD Manager's Newsletter, you should be able to go through the provided examples and gain a good working knowledge of the Block Editor, parameters and actions.
In the Help system of AutoCAD 2006, go to the Index tab and use the topic Block Editor to view a voluminous list of topics related to dynamic blocks and the Bedit command. You're likely to be overwhelmed at first, but scanning through the topics and doing a preliminary read will answer a lot of questions.
In his blog, Shaan Hurley, technical marketing manager for Autodesk's Platform Technologies Group, references a quick video capture of some dynamic block editing that is worth five minutes of your time. There's no talk track to the video, but if you watch carefully you'll see several good examples of working within the Block Editor command. Link to it at http://myfeedback.autodesk.com/files/dynblock.wmv.
In the next issue of the CAD Manager's Newsletter, I'll conclude my AutoCAD 2006 series with some additional coverage of dynamic blocks. I'll also answer some reader questions about AutoCAD 2006 that I've saving up. Until next time.