Graphics Programs Reference
In-Depth Information
operators and Boolean functions can all be used. Placement of parentheses,
proper units, case, parameter names, and context sensitivity are all
important for your formulas to work properly. A warning will appear if
the result of a formula does not match the units for a parameter or if a
parameter name is misspelled.
FormulascanevenbeusedforparametertypessuchasaYes/Noparameter.
Figure 6.14 shows a Boolean formula used to determine when a check box
should be selected for a Yes/No parameter. The formula indicates that the
box is either deselected or selected when the conditions of the formula are
true.
Figure 6.14 Boolean formula for a Yes/No parameter
Formulas using if statements are powerful for providing exact conditions
and variations in parameter values based on other parameter values. The
format for an if statement is as follows:
if( logical_test,value_if_true,value_if_false )
The value_if_false result is the value given to the parameter when the
condition is not met. You can use other parameters to define the condition.
For example, if you want a Width parameter to equal the Length parameter
under certain conditions, you could write this formula:
if(Length>2′ 0″, Length, 1′ 0″)
if(Length>600mm, Length, 300mm)
This formula would cause the Width value to equal the Length value when
the Length is greater than 2′-0″ (600 mm); otherwise, the Width value
would be 1′-0″ (300 mm).
 
 
Search WWH ::




Custom Search