About Rules

A rule is a set of instructions, generally based on conditional statements, whereby the relationship between parameters is controlled.

In addition, depending on the context described by the rule instructions, actions can be executed:

  • To set a value or a formula to parameters, including feature activity.
  • To display information windows.
  • To affect points, curves and surfaces and thus allow contextual and automatic topological changes.

In the tree, the rule appears as a relation that can be activated or deactivated. Like any feature, a rule can be manipulated from its context menu. A rule is executed when one of its input parameters has changed or when one of its input features has changed and if you require the update of the rule. The consequence is that it is impossible for you to completely control when the rule is to be fired. As a result, rules can only manipulate parameters and features and are to be used to control the status of a design (change of parameters and geometry).

Notes:
  • Names starting with forbidden characters or digits are not managed properly in rules. If you want to use such characters, put them in simple quotes.
  • When a rule or a reaction is triggered, the update of the input objects is triggered prior to the firing of this rule/reaction.
  • If you access a feature attribute in a rule, the modification of the attribute value does not launch a new evaluation of the rule. Only parameters modifications (parameters available in the Formula Editor) launch a new evaluation of the rule.
Important:
  • If you want to control when the action takes place, use a Reaction. To find out more, see Creating Reactions.
  • Rules can be upgraded. Like with other objects using computation algorithms, the upgrade command switches all algorithms used in expressions to the last available version of algorithms. For example, if a rule uses a line constructor and this line constructor algorithm has been modified, this modification is versionned, and the last algorithm version is used only if the relation is upgraded. When the relation is modified explicitly, it is automatically upgraded.