Conditional Attributes

You can cause objects to hide, show, and change colour dynamically, based on specified conditions such as "r1<r2" or "sin(a1)>=cos(a2)."

For example, you might want to hide an object based on a changing measurement that you have assigned to a variable, or you might want an object’s colour to change based on a "Calculate" result assigned to a variable.

Conditional behaviours can be assigned to objects or groups in the Graphing, Plane Geometry, and 3D Graphing views.

Setting Conditional Attributes of an Object

You can set conditions of a selected object either by using its context menu or by activating the Set Conditions tool from the Actions menu and then selecting the object. These instructions describe using the context menu.

1. Select the object or group.
2. Display the object’s context menu, and click Conditions.

The conditional attributes are displayed.



For 2D objects

 


For 3D objects

3. (Optional) In the Show When field, enter an expression specifying the conditions during which the object will be shown. Anytime the condition is not satisfied, the object will be hidden.

You can specify tolerance by using compound conditionals in the Show When input field. For example, area>=4 and area<=6.

Note: If you need to see conditionally hidden objects temporarily, click Actions > Hide/Show. To return to normal viewing, press ESC.

4. (Optional) Enter numbers or expressions that evaluate to numbers in the applicable colour fields, such as Line Colour or Mesh Colour. To see a map of colour values, click the Coors button.


Map of conditional colour values

5. Click OK in the Conditional Attributes dialogue box to apply the conditions.