Setting Priorities for Evaluating Rules
- Last UpdatedFeb 19, 2025
- 2 minute read
By default, the rules for the member elements of a design template are executed in descending hierarchic order. If the rule for one member element includes a reference to the result of a rule for another member, it is important that the latter rule is executed before the former, otherwise an incorrect result will be obtained.
The user can control the order in which the rules for a given template will be executed by assigning a rule sequence number to any element which has a local name. When the template rules are re-executed, the rules for such elements will be executed in ascending order of their sequence numbers: the rules for elements with sequence numbers unset (or zero) will then be executed in the default order. Each rule sequence number, and the reference of the corresponding element, is stored in an array attribute of the template. Rule sequence numbers are therefore set and queried at member element level, even though they are stored at template level.
Keywords
RSEQNUMBER
Description
Assign a rule sequence number to any design template member which has a local name. The rule sequence number must be a positive integer (zero is equivalent to unset). The same sequence number may be assigned to more than one element, but this is not recommended.
Examples |
|
|---|---|
|
RSEQN 3 |
Sets rule sequence number for current element (which must be a member of a design template and must already have a local name) |
|
RSEQN UNSET |
Unsets rule sequence number for current element |
Command Syntax
>--- RSEQNumber ---+--- integer ---.
| |
‘--- UNSET -----+--->
Querying
|
Q RSEQN |
Gives sequence number for current element |
|
Q RSEQA |
Lists sequence numbers for all elements under current template (in the order in which their local names were set) |
|
Q RSEQFA |
Lists local names for elements under current template, sorted by rule sequence number; that means, in order of rule execution priority |