Specifying Priorities for Evaluating Rules
- Last UpdatedNov 07, 2025
- 5 minute read
When the rules within a design template definition are run (as, for example, when an instance of the template is copied into the design model), the rules for the member elements are evaluated, by default, in descending hierarchic order.
If, however, the rules for one element involve the current attributes of another element, the order in which the rules are run becomes significant and the default sequence may not give the intended result. As an example, if the positions of elements /A and /B are both defined by rules, and if the position of /A is defined relative to that of /B, then the rule for positioning /A will only give the correct result if the rule for /B has already been run.
You can control the order in which the rules for a given template will be run by assigning a rule sequence number will be run to any element which has a local name (see Assigning Local Names to Template Elements). When the template rules are re-run, the rules for such elements will be run in ascending order of their sequence numbers: the rules for elements without numbers will then be run in the default sequence.
Thus, in the preceding example, you would assign a smaller sequence number to element /B than to /A, so that the rule for positioning /B is run before the rule for /A.
To specify the sequence in which the rules for template members are to be run, first allocate local names to the relevant elements, then use the Modify > Order Local Names menu option to sort the list of local names into the required order.
Exercise continues:
-
We will assign local names to the two design points and to the cylinder representing the main body of the vessel (the reasons will become clear when we set up the parameterization rules).
Select Modify > Parameterization. The Template Member Parameters form lists all members of the template.
Select (1) DPCA in the list and select the Set Local Name button. On the resulting Local Name form, enter Datum-Point-1.
Similarly, assign local names Datum-Point-2 to (2) DPCA and Main-Body to CYLI 1. You do not need to assign a local name to the negative cylinder. The result should be:

-
When the template rules are evaluated, the positions of the design points will be derived from the positions of the cylinder’s p-points. It is important, therefore, that the rules for the cylinder are evaluated before the rules for the design points.
Select Modify > Order Local Names. The Local Name Rule Sequence form lists all elements with local names in the order in which their rules will be evaluated. By default, this is the order in which the names were assigned.
Select /Main-Body and click
to move this name to the top of the list, thus:

OK the change, then dismiss the form.
We will now set rules for the template parameters in terms of the properties defined so far. The effect will be to move the primitives and design points to the required positions relative to the template origin, as shown in the diagram at the beginning of this chapter.
-
Select Modify > Parameterization to show the Template Member Parameters form. In the Template Members list, select CYLI 1. Notice how the current position and orientation of the cylinder are shown in the 3D View. Its Origin is at its center.
We want to move the cylinder so that Design Point 1 (at P1) is directly above the template origin, with a separation given by the Centreline Height (CHEI) property.
Select Position in the Rules table list and enter the following:
X
leave unset
Y
CDPR CHEI
Z
CDPR LENG / 2
OK the change.
To display the origin and orientation for the overall design template, navigate to /Vessel -Main-Body in the Design Explorer and either select Query > Axes or click
. On the Define Axes form, select Cardinal Directions to show ENU directions instead of XYZ directions. Select Close > Retain Axes to dismiss the form while still showing the axes.
Look carefully at the new position for the cylinder relative to the template origin: it may not be quite as you expected. We will now consider why this should be.
The effect of the last change was to move the cylinder up by the CHEI dimension and south by half the LENG dimension. Remember, however, that until the template is instanced in a design, and the design parameters are set, the default values for these dimensions apply. The actual cylinder length is currently that of the original Equipment from which the template was copied.
Consider the position along the cylinder’s axis. Its length, defined by its Height attribute is 1500. The parameterization rule has moved the cylinder along its axis by half the default LENG, which was set to 2000:

-
Select Height in the Defined Rules list and enter the rule CDPR LENG. Notice that because this setting increases the length of the vessel to the default value of LENG (namely 2000), the effect shown in the preceding diagram is corrected.
-
Set the rule for Diameter to CDPR DIAM. Leave the Orientation rule unset, so that the cylinder’s orientation always defaults to that of its owning equipment when the template is instanced in a design.
-
Now select NCYL 1 in the Template Members list and set appropriate rules for its Position, Height and Diameter.
Did you remember that the position of the negative cylinder is defined with respect to that of its owning cylinder (that means, at 0,0,0)?
-
Select (1) DPCA and set a rule for its Position as follows:
-
On the Rule Definition (Position) form, set the expression to:
AT PP1 of LNID /Main-Body
which positions the design point at a p-point of the locally-named cylinder (see Assigning Local Names to Template Elements for an explanation of why a local name is required here).
-
-
Repeat this sequence to set the Position of the second design point (2) DPCA to PP2 of the same cylinder.
-
Switch to wireline mode, or set the graphical representation to shows holes drawn, and check that the positive and negative cylinders correctly represent the vessel body. When you are satisfied, dismiss the parameterization form.