Google Search

Loading

Saturday, September 11, 2010

Lesson 4: Control a Design Using Parameters and Expressions


Learning Objectives

On completing this lesson, you will be able to do the following::


■ Incorporate formulas and expressions, and manage them with the
Parameters Manager.

■ Create and name user variables.

File Name: PD_Deck4.dwg, PD_Areas.dwg

Command: PARAMETERS, -PARAMETERS


You can modify dimensional constraints and user variables either directly or
with the Parameters Manager

To rename dimensional constraints

Let’s change some dynamic constraints to use more descriptive names.

1 Open the drawing file, PD_Deck4.dwg.


2 Double-click the dynamic constraint, d1, and change the d1 to Length
as the new name.

3 Press Enter or click outside the edit box to accept the change.



Another way to change the name of a dynamic constraint is to use the
Parameters Manager.

4 On the Parametric tab, Manage panel, click Parameters Manager.


5 In the Name column, double-click d2 and enter Width.

6 Press Enter or click outside the edit box to accept the change.

To define a user variable


Often, it is convenient to make a single change that affects multiple dynamic
constraints. For example, you might want to experiment with several tread
widths for the steps in the deck plan.

1 Double-click an empty row in the Parameters Manager.


2 Change the name of the new user variable from user1 to Tread.


3 Press Enter or click outside the Parameters Manager palette to accept the
new name.

4 Change the value in the Expression column from 1 to 45.


5 Press Enter or click outside the Parameters Manager to accept the new
value.

6 In the Expression column of d5, d6, and d7, enter Tread.



These changes associate the value of each of these distances with the user
variable, Tread. Let’s test your control over the tread widths


7 In the Expression column of the user variable, Tread, change the value
from 45 to 60. Then change it to 40.

The changes are updated automatically in the deck plan.

8 Close the drawing without saving it.

To create dimensional relationships between objects


The Expression column in the Parameters Manager can contain constants,
references to dynamic constraints, references to user variables, arithmetic
operators, and functions. Consider the following example.

1 Open the drawing file, PD_Areas.dwg.


This is a fully constrained drawing of a rectangle with a circle at its center.
The circle always has the same area as the rectangle. Let’s examine the
dynamic constraints in detail.


2 On the Geometric panel, click Show All and then Hide all to confirm
that geometric constraints have been applied.


3 If necessary, open the Parameters Manager

4 In the Parameters Manager, click the Length row.


As long as your cursor is in the Parameters Manager, the Length dynamic
constraint remains highlighted in the drawing. Length is set to the constant
60.

5 Click the Width row and observe the highlighted dynamic constraint.


To center the circle, the d1 and d2 dynamic constraints are defined as
Length/2 and Width/2. The user variable, Area, is defined as the product
of Length and Width, the area of the rectangle.

6 Click the Radius row.


The radius of the circle is defined with the expression containing the area
of the rectangle, the square root function, and the constant, PI. This sets
the radius of the circle to a value that constrains the area of the circle to
be equal to the area of the rectangle.


Notice that you can store expressions in a dimensional constraint or in
a user variable. A full list of available functions is documented in the
AutoCAD User’s Guide Help topic, Constrain a Design with Formulas and
Equations.


7 Experiment by changing the values for the length and width of the
rectangle.


Notice that the Value column displays the current value of the expression
in the Expression column. Are you curious what would happen if you set
the length of the rectangle to 0 or -1?

8 Close the drawing without saving it.

Summary



You have learned how to incorporate mathematical expressions in dimensional
constraints and in user variables with the Parameters Manager. These tools
provide a method for completely controlling the shape, size, and proportions
of a design.


Review Questions


1 What are the two places within a parametric drawing that you can store
a formula?


2 How can you display a list of user variables in a drawing?


3 What is the purpose of the Value column in the Parameters Manager?



For more information about working with the Parametric Drawing feature,
see the AutoCAD User’s Guide. Help topic, Design with Parametric Constraints.



No comments:

Post a Comment