Create and Edit Routing Rules
- Last UpdatedJan 12, 2026
- 8 minute read
PDMS stores rules within a hierarchy. There are two administrative elements within the hierarchy:
-
Rule World, whose type is RLWL
-
Rule Set, whose type is RLST
PDMS stores routing rules, whose type is GRUL, within a rule set. When you can create a new rule, define the type of rule by selecting the correct purpose, the defining the expressions within it. The rule can now be applied to individual branches or all the branches in a particular site, zone or pipe.
By default, all rules in the rule sets applied to a branch will be considered to be applied to each component in the branch. However, you can also disable any of the rules, or apply rules from other rule sets, to any individual component.
A sample set of rules is provided with Pipe Router in the Sample Project. The Rule World is named /PIPES-RULES, and it owns several rule sets. The rules in the rule sets are examples which the user can use to build a customized set, and do not necessarily represent good engineering practise.
To create a rule world:
From the Pipe Router window, select Settings > Routing Rules. The Routing Rules window is displayed. Select Create > Rule World. The Create Rule World window is displayed. In the Name box, input a name for the rule world, click OK to create the Rule World.
The rule world is created and is displayed in the Members List. You must now create a rule set within the rule world.
To create a rule set:
Ensure that at the level of the Rule World in which you want to create the rule set is selected. From the Routing Rules window, select Create > Rule Set. The Create Rule Set window is displayed. In the Name box, input a name for the Rule Set. In the Function box, input the function of the rule set. (The function is simply a descriptive term which enables you and other users to identify the purpose of the rules contained within the rule set.) Click OK to create the Rule Set.
The set is displayed in the Members List. You can now create routing rules and store them within the rule set.
Create a Routing Rule:
From the Pipe Router window, select Settings > Routing Rules to display the Routing Rules window:

Select where the rule is to be stored by first selecting the rule world from the Current Rule World drop-down list, and then the rule set from the Current Rule Set drop-down list.
To create a new rule, select Create > Rule > New. The Create Rule window is displayed and a new rule element (GRUL) is created in the design hierarchy.

To name the new rule:
In the Name box, input a name for the new rule element, which is the name of the rule element (GRUL) that will be displayed in the design hierarchy.
Click OK to name the new rule element, close the Create New Rule window and display the Rule Attributes window:
Click Cancel to discard inputs and close the Create New Rule window.

In the Description box, input a description for the rule. The description will be displayed in the Routing Rules window.
Select a purpose for the rule from the Purpose drop-down list.
In the Selection box, input an expression. For example: ALL VALV WITH (ATTRIB STYP EQ ‘GATE’), this expression tells Pipe Router that the rule is applicable to all valves that have their attribute STYP set to GATE, that is, all gates valves.
In the Logical box, input an expression. For example: ( ATTRIB PDIR 3 EQ N ), this expression checks whether or not the direction of P3 on each gate valve is set to north. If it is, then the gate valve meets the criteria of the rule and no action is taken. If the direction of P3 is not north, then Pipe Router performs the action expression described in the next step.
In the Action box, input an expression. For example: (AXES PP 3 IS N AND AXES PL IS AXES PL OF PREV), this expression tells Pipe Router to change the direction of P3 to north, and make the leave direction the same as for the previous component.
You can select the attribute of the CE, click Current Rule. The Rule Attributes window is now populated with the details for the current rule.
To test the rule:
You must set the extent of the test (World, Site, Zone, Pipe), from the Test Rule drop-down list, which will perform the selection operation defined for the rule, then perform the logical test for each component selected, and report which components passed and which failed. The report is displayed on the Rules Testing window.

Click OK to create the routing rule. The user can now apply the rule to a Branch in the usual way.
Click Cancel to discard any inputs and close the Rule Attributes window.
To copy a rule:
To copy an existing rule, from the Routing Rules window, select Create > Rule > Copy.
The Create Copy Rule window is displayed:

To name the copied rule:
In the Name box, input a name for the copied element, which is the name of the rule element (GRUL) that will be displayed in the design hierarchy.
Click OK to name the copied element and close the Create Copy Rule window. The Rule Attributes window is displayed:
Click Cancel to discard inputs and close the Create Copy Rule window
When you create a copy of a rule, the Rule Attributes window is displayed, filled in with the details of the copied rule. You can then simply edit the details of the rule, which enables you to select an existing rule and use its details as the starting point for a new rule or modify the details to suit your purpose.
Modify a Routing Rule
You can edit a routing rule, using as an example the sample rules supplied in the rule set TRAVEL-RULES. The rules are modified to give a better route for the pipe rack example in Create and Use Pipe Racks.
Using Rules to Specify How Pipes Use a Pipe Rack
You can specify the type of pipes you want to route on each level of a pipe rack, using routing rules. For example, you can tell Pipe Router to place all process pipes on the bottom level of a rack and all utility pipes on the top level of a rack. If there are more than one entry/exit plane, you can specify the way in which pipes enter onto and exit from a particular level. For example, have all liquid utility pipes climbing onto a travel plane and all gas utility pipes dropping onto the same travel plane.
For example, you can edit the example pipe rack rules that are supplied with Pipe Router and apply them to avoid the pockets created by the default route.
To modify a routing rule, from the Pipe Router window, select Settings > Routing Rules to display the Routing Rules window:

The Rules available are supplied in the sample project. Make sure that the Current Rule World is set to PIPE-RULES and the Current Rule Set is TRAVEL-RULES. There are three Rules supplied: a Travel Plane Rule, an Entry Plane rule and an Exit Plane rule.
To see the expressions in the Travel Rule, you must select the rule in the list and then select Modify > Rule on the Routing Rules window. The Rule Attribute window is displayed populated with the attributes for Travel Rule.

From the Rule Attributes window, note that:
-
The Selection text box contains the expression
ALL BRAN WITH ( ATTRIB PURP OF OWNER EQ PROC )
which means that the Rule can be applied to all Branches owned by Pipes whose PURP attribute is set to PROC.
-
The Logical text box contains the expression:
( ATTRIB FUNC EQ 'PROCESS' )
which means that the Travel Planes must have their FUNC attribute set to PROCESS.
-
To see the expressions in other rules, select the rule in the list on the Routing Rules window and click Current Rule on the Rule Attributes window.
-
The Entry and Exit Plane rules as supplied both have their Logical expressions set to:
( ATTRIB FUNC EQ 'ENTRY' )
The next step is to change the Logical expression for the Exit Rule.
Select the Exit rule in the list on the Routing Rules window and click Current Rule on the Rule Attributes window. Change the Logical expression to be:
( ATTRIB FUNC EQ 'EXIT' )
Before you can test the rules, the Pipe PURP attribute must be set to PROC.
-
Make Pipe 2001 the Current Element
-
Select Modify > Attributes Global from the Pipework Application main menu bar, the Global Attribute Change window is displayed:

You must now select an attribute, select Purpose from the list of attributes. Click to select All attribute data. In the with box, input PROC.
Click Apply to change the global attributes and close the Global Attribute Change window or Dismiss to discard any inputs and close the Global Attribute Change window.
From the Rule Attributes window, you can now test the rule:
For example, the exit plane rule. Select the exit Plane rule in the list and make sure that Pipe 2001 is the Current Element. Set Test Rule to Pipe.
The Rule Testing window will be displayed, which shows you that 1 Branch has been selected for the rule but 0 Plane. No Planes have been selected because there are no Planes with Function set to EXIT.
To modify the functions of the planes in the Pipe Rack:
Make the Pipe Rack the current element and select Modify > Pipe Rack from the Pipe Router window.
On the Modify Pipe Rack window, change the Function of the planes as follows:
|
Level 1 Upper Entry/Exit Plane: |
EXIT |
|
|
Level 1 Travel Plane: |
PROC |
|
|
Level 1 Lower Entry/Exit Plane: |
ENTRY |
Associate the Rule with the Branches required. Select the Branch 2001/B1 on the Routing Rules form. Select Settings > Branch Rules from the menu on the PDMS Router form. On the Branch Rules form, set Apply rule sets to All Selected Branches. Select HIGH, and the rule will be added to the form.
Now re-route the Pipe. A more satisfactory route will be obtained.
Deleting a Rule World, Rule Set or Routing Rule
To delete a rule world, rule set, or routing rule, you must navigate to the rule world and rule set to be deleted from the Current Rule World and Current Rule Set drop-down lists. You must then select the rule to be deleted from the routing rules list. Select Delete > Rule World, Delete > Rule Set or Delete > Rule, as required.