About Rules

A rule is a set of instructions, generally based on conditional statements, where 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 in 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, you can manipulate a rule using its Shortcut 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 executed. Rules can only manipulate parameters and features. Use them 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 the 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 before the firing of this rule/reaction.
  • If you access a feature attribute in a rule, the modification of the attribute value does not start a new evaluation of the rule. Only parameters modifications (parameters available in the Formula Editor) start a new evaluation of the rule.
Important:
  • If you want to control when the action takes place, use a Reaction. For more information, 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 versioned, and the last algorithm version is used only if the relation is upgraded. When the relation is modified explicitly, it is automatically upgraded.