Extended modules > Relations > Relation variables
  
Relation variables
Relation variables are defined with an expression or a value. You use these variables in other relations when a single value is used in multiple relations. For example, if several features on a part should change when you change one value, you can use a variable to efficiently change all the relations.
If you change the unit of measurement, the variable value for distance and angle measurements is adjusted automatically to this new unit. For example, if you switch from mm to inch, the length value is automatically divided by 25.4. The variable value for number variables (which are dimensionless) remains the same; expressions are adjusted to compensate for any unit change in expression terms.
The following image illustrates this example. Here, a single variable (rad1) has been defined and then declared in the radii expressions. On the left, rad1=15; on the right, rad1=5.
You can create the following types of variables:
Distance. The expression or value you specify defines the distance between two elements.
Expression. Type a mathematical expression such as vdist1+30.4 for the distance.
Value. Type a numeric value for the distance.
Angle. The expression or value you specify defines the angle between two elements.
Expression. Type a mathematical expression such as vang5-mang3 for the angle.
Value. Type a numeric value for the angle.
Number. The expression or value you specify defines a numerical variable.
Expression. Type a mathematical expression (such as vnum12*3.44) to specify the numerical variable.
Value. Type a numeric value.
Logical. A logical variable can be defined with any logical expression. Depending of the current status, this expression evaluates to true (1) or false (0). The value of the logical variable may be used in other expressions, for example vlog1*100 or as a logical operator in another if-then-else expression, for example, if vlog1 then ... .
Check. Check relations are relations containing logical expressions which are checked for each Preview or Update operation. If the expression evaluates to false, Creo Elements/Direct Modeling issues an error message and the relation status changes to failed. The check relation functionality can therefore be used to verify that certain measurements lie within a specific range.
* 
If Var checks is switched off in the relation settings, an error message is issued telling you that although the solution has been solved and the status is set to failed.