# Parametrics 102: Sizing Things Up

28 Jan, 2010 By: Bill Fane### Learning Curve tutorial: With the magic of parametrics in AutoCAD 2010, you can start with a rough sketch of a basic concept and then refine and revise the dimensions as the design proceeds.

It was a warm and sunny Christmas day. Captain LearnCurve and his gorgeous wife were sitting outside in T-shirts and shorts having Christmas dinner with their daughter, son-in-law, and three grandchildren ...

*Wait a minute! Doesn't the Captain live in Vancouver, host city of the 2010 Winter Olympics? Why were you wearing T-shirts and shorts at Christmas?*

There are two answers. First, Vancouver is not as cold as many people think. Second, they weren't in Vancouver, they were in a condo on Maui. They had arrived a week before Christmas. The kids stayed for three weeks, but the Captain and his gorgeous wife were stuck there until early March. Life is tough.

Okay, I'm so relaxed here that I can't figure out a groaner of a segue ...

*And the bad news is ... ?*

... so let's just jump right into this month's topic.

My previous column introduced the parametric functionality in AutoCAD. We saw that there were two kinds of parametric constraints, and learned that the geometric ones work like "sticky" object snaps. We built three orthographic views of a part without using a miter line or any construction geometry, and saw how everything stayed aligned and connected when we moved or stretched anything.

Now let's look at the dimensional constraints. It could be argued that these are the "true" parametric constraints if we look at the origin of the word "parametric," which comes from two Greek words:

- "para" means to work with, or to work alongside. For example, ambulance crews are paramedics; they work with the medical people.
- "metros" means measure. The words "meter" and "metric" come from this same root.

Let's go back to our high school math. The general equation for a line is *y=mx+b*. It says that you can find the current value of the *y* coordinate of a point on the line by taking the current *x* value and multiplying it by *m*, the slope of the line, and then adding *b*, the offset value where the line crosses the *y* axis. In this example, *m* and *b* are parameters. You can define any line simply by varying these two values.

In AutoCAD, dimensions normally are associative. If you stretch the length of a line, then the dimension value will change.

On the other hand, a parametric dimension is the opposite: If you change the value of the dimension, then the line changes length. Meanwhile, all of the attached geometric constraints are still active, so everything updates. The value is not an after-the-fact measurement, it is the driving value.

Let's try this. Draw a horizontal and then a vertical line and apply geometric constraints to them. The easy way is to use Autoconstrain to apply the Horizontal, Perpendicular, and Coincident constraints, and then manually add a Fix constraint to the left end of the horizontal line.

**Two constrained lines.**

Next, make sure the system variable is still set to its default value of 0 (zero).

Now apply two dimensional constraints using the Linear option of the DimConstraint command. To do this, click on the Parametric ribbon tab and then click on the Linear button in the Dimensional panel.

**Parametric dimensions added.**

As you apply these two dimensions, there are several things to note:

- The DimConstraint command uses its own object snaps, so it doesn't matter if Osnap is on or off.
- The dimension text takes the form of
*d1=nnn*,*d2=nnn*, and so on. Okay, this isn't really dimension text. Each of these items is actually a parameter name followed by the current value of the parameter. - Each piece of dimension text is followed by a small padlock icon, indicating that it is a dynamic (parametric) constraint.
- If you zoom in and out then the dimension text always retains the same screen height, and therefore is always readable, regardless of drawing scale.
- The dimensions won't plot or show in a plot preview.

Ah, but now comes the true magic of parametrics. Double-click on a dimension and change its value. Hey, presto! The line changes length to match the new value, and meanwhile the other line remains attached and perpendicular!

**Change the parameter values, and everything updates!**

This changes everything, and I don't just mean in the current drawing. It changes the very foundations of how drawings are created and edited.

Okay, a quick show of hands. How many of you sketch the first basic concepts for a new design on a cafeteria napkin? Hmmm, about 97.372%. I thought so. Unlike conventional AutoCAD, we can now use NAD (Napkin-Aided Design, an acronym I coined for a Mechanical Desktop review many years ago) on our computers.

As with dancing and hand grenades, close enough is good enough. Initial sizes of objects do not need to be exact, as long as they are approximately the right proportions. We can start with a rough sketch of a basic concept and then refine and revise the dimensions as the design proceeds. It also becomes very easy to produce drawings of similarly shaped but differently sized parts without having to draw everything all over again.

Let's take a look at the part we created last time when we studied the geometric constraints. As we saw, it was possible to draw three linked orthographic views without having to use any construction geometry or exact values. Now here is that same part again, but with parametric dimensions applied.

**Three rough orthographic sketches...**

Now let's look at this same drawing seven seconds later, after I have changed the parameter values:

**...and seven seconds later, we have a precisely dimensioned drawing.**

Notice that all objects in all views have maintained their correct orthographic alignments and relative sizes. Now you see what I mean about a quantum shift in how we can create and edit drawings. For several decades I beat on AutoCAD students about the need for precision entry. Not any more; just create a quick NAD sketch, constrain and dimension it, and then input the precise sizes. As the design proceeds, changes can be made on the fly so you can easily play "what if" games.

**But Wait! There's More!**

*I certainly hope so! This all looks very interesting, but isn't it a bit of a nuisance if the dimensions don't plot?*

Not a problem. Actually, there are two kinds of parametric dimension. We have already seen the "dynamic" kind that are visible, always readable regardless of drawing scale or zooming, and don't plot.

Be sure to come back next time when we learn about annotational constraints, which should not be confused with annotative dimensions because an annotational constraint can also be annotative. Trust me.

We will also learn how to create intelligent drawings, wherein we can establish mathematical relationships between dimensional constraints. For example, if you change the volume and pressure of a tank of a specified diameter, then the length and wall thickness will change according to specified rules.

Design and drafting as we knew them, and CAD in particular, have changed forever.

**And Now for Something Completely Different ...**

When you visit Maui, be sure to attend an outdoor church service at Trinity by-the-Sea Episcopal Church in Kihei. Christmas Eve under the palm trees and the stars is particularly moving.

**Note: Comments are moderated and will appear live after approval by the site moderator.**

**
**