Parametrics 103: That Figures!10 Jun, 2010 By: Bill Fane
Learning Curve tutorial: Annotational dimensional constraints let AutoCAD users create intelligent drawings that capture design intent.
It was a warm, sunny Wednesday afternoon. Captain LearnCurve was on special assignment as his driver skillfully piloted the Lincoln Town Car northbound on I-35.
Here we go again! Now what on earth have you bought, and/or what are you up to now?
Nothing much. The Captain and his fellow CAD Brothers had finished presenting their classes at the AUGI CAD Camp in Austin, Texas, on Tuesday and were headed to Dallas for the next event in an on-going series.
The CAD Brothers: Robert Green, Bill Fane, Rick Ellis, and David Cohn.
David Cohn had arranged for the rental car. When we picked it up we were told that the generic sedan he had reserved wasn't available. Would we mind taking the Lincoln instead as the rental company wanted it back in Dallas anyway? We figured they should be paying us, because they wanted the car delivered.
That's it! This month's topic! Figuring!
My previous two articles have covered different aspects of AutoCAD's parametric design functionality, which was introduced in AutoCAD 2009. The first article, "Parametrics 101: Don't Be Afraid," discussed geometric constraints and "Parametrics 102: Sizing Things Up" introduced dimensional constraints. Between them I showed how geometric constraints effectively are sticky object snaps that hold drawing objects together, and dimensional constraints are the reverse of normal associative dimensions in that the object changes size if you change the value of the dimension. This time around I'll delve into annotational dimension constraints, which use current dimension style, plot, and scale to match drawing dimensions.
Are You My Type?
At the end of the last article, I mentioned that parametric dimensions come in two versions. Everything I explained last time used the default dynamic dimensional constraints that are of a fixed style, automatically stay the same screen size as you zoom in and out, and don't plot. They can also be made invisible, either collectively or singly.
Let's look at the other type of dimensional constraint. When the CConstraintForm system variable is changed from its default value of 0 to 1, any subsequent dimensions are applied as annotational dimensional constraints. Annotational dimensional constraints differ from dynamic ones in three significant ways:
First, they are applied using the current dimension style.
Second, they plot.
Third, their zoom behavior matches conventional dimensions in that they appear larger and smaller as you zoom in and out.
The More Things Change
Just to add to the fun, annotational dimensions also can be annotative in that they can size themselves automatically to match the drawing scale.
To change the value of CConstraintForm using the ribbon, click on the Parametric tab, then on the Dimensional tab, then on the down arrow to expand this tab, and then on the desired setting. The new value is saved in the system registry, so all subsequent drawings will use its current setting.
What if you change your mind after you have placed parametric dimensions? No problem. The Properties command will let you switch existing dimensions back and forth between types.
Better yet, you can convert existing associative dimensions from older drawings to parametric ones by using the DcConvert command (Parametric > Dimensional > Convert). Similarly, geometric constraints can be added to existing objects, so it is easy to convert legacy drawings into parametric ones.
Okay, I lied. There's also a third type of parametric dimension. If you try to apply too many dimensions, resulting in an overconstrained condition, then AutoCAD will complain and offer to apply a reference dimension instead. A reference dimension will report its current value if anything else changes, but you cannot drive geometry changes by changing its value. So why bother? Why not just use a normal associative dimension? Good question. The only answer I can think of is that they can be dynamic, with all the behavior characteristics implied by that type.
Once again, the Properties command will let you switch existing dimensions back and forth between normal and reference types. Reference dimensions also can be dynamic or annotational, and the latter can be annotative as well.
Pick a Type, Any Type
The AutoCAD documentation states that dynamic dimensional constraints are ideal for design work, so that is the default setting of CConstraintFormIt also states that manufacturing dimensions should be applied as normal associative dimensions.
I disagree with the documentation and have changed the setting. My experience is that nearly all of the dimensions used to design and constrain something also are needed to make the real object, so it doesn't seem to make sense to dimension everything twice. In addition, AutoCAD won't let you apply too many parametric dimensions, but you could easily end up with conflicting dimensions if you apply the documentation ones later.
But Wait! There's More!
I've covered the basics of parametrics, so let's get into the really interesting stuff.
Below is the example drawing I used last time, but this time I have added the hole and its hidden lines, all suitably constrained and dimensioned. Yes, I know I said I prefer annotational dimensions, but I want to show you something.
Note how the value of each dimension is actually an equation, such as d5 = 0.5000. What this really says is that this dimension is actually named d5" and that its current value is 0.5000 units.
Open the Parameters Manager palette (Parametric > Manage > Parameters Manager).
Note how it lists all the parameter names and their current values, and that dia1 has a multidecimal value. Double-click the dia1-Expression cell and change its value to something more desirable, such as 0.400. Bingo! The drawing updates! You can play with all the parameter values directly from within this palette.
Smarter than Your Average Drawing
Now for the real power of parametrics. You see, parameter values are not limited to being simple numbers. Double-click the rad1-Expression cell and change the number to show [(dia1 X 0.9) - 0.05] instead. A new number appears in the rad1-Value cell, and the drawing updates.
So far so good. Next change the value of dia1. Not only does the diameter of the circle change, but the outer radius also changes to reflect the newly calculated value and everything updates. Magic!
The Expression cells can contain references to more than one parameter name, can use nesting parentheses, and can use the full range of arithmetic, logarithmic, and trigonometric functions.
You can build intelligent drawings that capture design intent. This capability can include user-defined parameter names, so that a single parameter named Size can control the values of a large number of parametric dimensions, none of which include the exact actual value of Size, and the parameter named Size doesn't apply to any particular parametric dimension. A classic example would be something like a 0.5" pipe fitting wherein none of the dimensional values are 0.500, but the fitting is nonetheless known as a 0.5" fitting.
Let's make it even easier. The parameter names that are associated with specific dimensions are not stuck to the d1, d2, etc. format. Go back to the Parameters Manager palette, double-click on the dia1 name cell, and change it to read Hole. It now has a meaningful name that users can identify and understand. Better yet, the existing formula for the radius updates to use the new name, as does the dimension in the drawing.
After working your way through these three "Learning Curve" articles, I think you'll have to agree that the use of parametrics, especially in conjunction with annotative dimensions, is causing a total revolution in how AutoCAD users create and edit drawings.
And Now for Something Completely Different
The next time you visit Maui, be sure to take in Warren and Annabelle's Magic Show in Lahaina. If you happen to end up seated in the front row and if Warren happens to ask you to go out to the bar and get him a bottle of water, when you return tell him that you brought papaya juice instead. Trust me; it will be incredibly funny.
Autodesk Technical Evangelist Lynn Allen guides you through a different AutoCAD feature in every edition of her popular "Circles and Lines" tutorial series. For even more AutoCAD how-to, check out Lynn's quick tips in the Cadalyst Video Gallery. Subscribe to Cadalyst's Tips & Tricks Tuesdays free e-newsletter and we'll notify you every time a new video tip is available. All exclusively from Cadalyst!
Autodesk University 2013 - Exhibit Hall 4 Dec, 2013
New Video Demo: From Many CAD Systems, One 4 Dec, 2013
Revit 2014 Update Release 1 Now Available For Download - Crash Reductions or Enhancements? 19 Jul, 2013
How to Replace the Viewport Compass with your Company Logo 5 Jul, 2013