Automatic Pipe Route Administration
- Last UpdatedFeb 14, 2025
- 43 minute read
Routing Rules are special AVEVA E3D Design rules which are used to control, for example, how Pipe Router selects, positions and orientates components as Branches are routed, and also how Pipes are packed on Pipe Racks and Routing Planes.
Note: Refer to Model Reference for further information on defining rules for setting attributes.
You can apply routing rules to individual branches or all branches within a particular site, zone, or pipe, and you can also apply rules to individual components and remove rules from individual components, as required.
Routing Rule Purposes
There are different types of routing rules , which are used for different controls on the route. Rules are identified by their Purpose (PURP) attribute, and unlike other elements in AVEVA E3D™, you cannot create different, user-defined purposes for routing rules.
The routing rules available are listed below, identified by their PURP attribute, and with a short description. The purpose is set to a four-letter code, but it sometimes displays as a more descriptive text on the AVEVA E3D™ Router windows. How each rule is applied is described in detail in How Routing Rules are Applied.
Pre-processing
|
PRPR |
All rules with this Purpose are executed before a Branch is routed. |
|
Selection |
|
|
BEND |
Bend or elbow selection: controls whether a bend or elbow is used for changing the direction of a pipe |
|
REDU |
Reducer type: specified when concentric or eccentric reducers are used |
|
Positioning |
|
|
DNSM |
Downstream pipe requirement: the length of pipe required downstream to the next component |
|
UPSM |
Upstream pipe requirement: the length of pipe required upstream from the previous component |
|
ELEV |
Component elevation: absolute or relative elevation of a component |
|
LOCA |
Component location: 3D position of a component |
|
Orientation |
|
|
MAJO |
Orientate on major axis: positioning on vertical or horizontal pipe segment. |
|
MINO |
Orientate on minor axis: such as the orientation of a handwheel |
|
Clash exclusion |
|
|
CLEX |
These rules are used to allow specified types of element to clash. |
|
Pipe racks (and routing planes) |
|
|
TRAV |
Pipe Rack travel plane selection: controls which pipe rack travel plane is used to route a particular type of branch |
|
ENTR |
Pipe Rack entry plane selection: controls which pipe rack entry plane is used to route a particular type of branch |
|
EXIT |
Pipe Rack exit plane selection: controls which pipe rack exit plane is used to route a particular type of branch |
|
SHOE |
Shoe height requirement |
|
WEIG |
Identify heavy pipe |
|
ADGP |
Extra gap required on plane or rack |
|
FLWI |
Flange width on plane or rack |
|
Post-processing |
|
|
POPR |
All rules with this Purpose are executed after a Branch has been routed. |
How Routing Rules are Constructed
Routing rules consist of AVEVA E3D™ expressions which define:
-
Selection: the elements to which the rule applies.
All rules must have a selection expression.
-
A Logical test which evaluates to TRUE or FALSE. For example, (ATTRIB ADIR EQ D) specifies that the arrive direction is down.
Rules which use logical expressions are called logical rules. A Rule which does not have a logical expression is called a real rule, because its action (see below) is a real expression.
-
The Action which AVEVA E3D™ carries out. The actions for logical rules are carried out if the Logical test evaluates to False. For example,
-
(AXES PP 3 IS N) orientates a valve so that the P3 axis is in the north direction.
Actions
The Logical expression in a rule tests whether or not the component satisfies the rule. If not, that is, if the logical expression evaluates to False, and the rule has an action, the action is applied. Pipe Router then re-tests the component. If the logical expression still evaluates to False, the Action is reversed.
-
Logical rules may or may not have actions.
-
Real rules must always have actions.
Of the logical rules, the following use actions:
-
Minor axis
-
Elevation. If no action is specified, and the rule fails, a message is output.
-
Location. If no action is specified, and the rule fails, a message is output.
-
Upstream pipe requirement
-
Downstream pipe requirement
-
Pre-processing
-
Post-processing
If you do not define an action for these rules, then the default action is taken, which depends on the rule.
Using PML Functions in Routing Rules
The Logical and Action expressions in Routing rules can call PML functions, which allows you to define much more complex logical tests and actions than can be done using simple expressions. A function is called by setting the rule action to a text string which is the name of the .pmlobj file. The file contains the object definition, followed by a method definition.
The function must be defined using fixed names for the following elements:
|
CEREF |
The DBREF of the element the rule applies to. |
|
RESULT |
The returned boolean result. (Logical parts of rules only.) |
|
RULEMETHOD |
The method which is applied. |
|
OBSREF |
The DBREF of the Element clashing with the Branch. (Clash exclusion rule only). |
Examples of calling PML functions are given in the following sections:
|
Pre-processing rules |
Refer to Pre-processing (PRPR) for further information. |
|
Minor Axis orientation |
Refer to Orientation for further information. |
|
Clash exclusion |
Refer to Clash Exclusion (CLEX) for further information. |
|
Post-processing rules |
Refer to Post-processing for further information. |
How Routing Rules are Applied
The following sections describe in detail which expressions are required by each type of rule, and how the rules are applied. Most of the examples are taken from Rules supplied with the product. To see more examples, select Settings > Routing Rules from the Pipe Router window, which displays the Routing Rules window. Select a Rule Set, then select a Rule from the list. To see the expressions in the rule, select Modify to display the Rule Attributes window.
|
Pre-processing (PRPR) |
Logical, will have Action |
All rules with this Purpose are executed before a Branch is routed. The Action is normally a PML function, which must have been defined before the rule is applied.
Typically this type of rule is used where it is simpler to have a single rule to create, position and orientate several components rather than have individual rules. For example:
-
To build pipes of fixed geometry using a single rule to position and orientate all the components.
-
To build templates for parts of branches, for example, a control loop at the start of a branch.
The Selection part of the rule identifies a key component: for example, you can identify Valves which require control loops by setting a UDA to a certain value, and then setting the selection expression to select all the Valves with the given attribute value.
The PML function then creates, positions and orientates the components and finally sets the head working point attribute to the last component covered by the rule. AVEVA E3D™ Router then takes over and routes the Branch.
A suitable PML function displays following. Note that at the end of the positioning and orientating commands, the RLOC attribute is set to 0 (Locked).
define object PREPROCESS
member .CEREF is DBREF
endobject
define method .RULEMETHOD()
if ( !THIS.CEREF.owner.phdir.east gt 0 ) then
prev tee
ori and p3 is n
dist 200
rloc 0
$!THIS.CEREF
ori pa is w
pos polar e dist 350 from prev tee
rloc 0
next tee
ori pa is w and p3 is n
pos polar e dist 250 from pl of $!THIS.CEREF
rloc 0
valv 1 of cref
ori pa is w and p3 is up
at w 500 wrt $!THIS.CEREF
rloc 0
elseif ( !THIS.CEREF.owner.phdir.east lt 0 ) then
prev tee
ori and p3 is s
dist 200
rloc 0
$!THIS.CEREF
ori pa is e
pos polar w dist 350 from prev tee
rloc 0
next tee
ori pa is e and p3 is s
pos polar w dist 250 from pl of $!THIS.CEREF
rloc 0
valv 1 of cref
ori pa is e and p3 is up
at w 600 wrt $!THIS.CEREF
rloc 0
elseif ( !THIS.CEREF.owner.phdir.north lt 0 ) then
prev tee
ori and p3 is e
dist 200
rloc 0
$!THIS.CEREF
ori pa is n
pos polar s dist 350 from prev tee
rloc 0
next tee
ori pa is n and p3 is e
pos polar s dist 250 from pl of $!THIS.CEREF
rloc 0
valv 1 of cref
ori pa is n and p3 is up
at w 500 wrt $!THIS.CEREF
rloc 0
elseif ( !THIS.CEREF.owner.phdir.north gt 0 ) then
prev tee
ori and p3 is w
dist 200
rloc 0
$!THIS.CEREF
ori pa is s
pos polar n dist 350 from prev tee
rloc 0
next tee
ori pa is s and p3 is w
pos polar n dist 250 from pl of $!THIS.CEREF
rloc 0
valv 1 of cref
ori pa is s and p3 is up
at w 500 wrt $!THIS.CEREF
rloc 0
endif
endmethod
The input to Pipe Router would be Pipes with a main Branch with the following sequence of components defined:
-
Tee
-
Valve with Stype CH
-
Tee
There would also be a second Branch, owning a Valve, with the Branch Head and Tail connected to the two Tees in the main Branch, which form the control loop.
The rule to call function displays and can be defined:

The rule is applied to the elements required in the normal way. An example of the control loop created displays in the following picture.

Note: Pipe Router locks the Tees and the Valves in position, so that they cannot be moved by any rules which are subsequently applied.
Selection
|
Bend or elbow selection (BEND) |
Logical, no Action |
Used to choose the type of component used to change direction. For example, the selection expression can be:
ALL BRAN MEM WITH ATTRIB ABORE LE 65
and the logical:
( ATTRIB TYPE EQ ’BEND’ )
makes sure that all Branches with bores less than or equal to 65 use Bends rather than Elbows.

The default method of changing direction, set on the Pipe Router Defaults window, is using Elbows.

The default method of changing direction, set on the Pipe Router Defaults window, is using a Rule. The rule specifies that small bore pipes change direction using Bends
Note: The rule is only applied if you set the Change direction using option on the Pipe Router Defaults window to Rule.
|
Reducer Selection (REDU) |
Logical, no Action |
To specify whether concentric or eccentric reducers are selected. For example, if the default reducers in a specification are eccentric, and you want concentric reducers in vertical sections of pipe but eccentric reducers in horizontal sections, the Selection expression in the rule can be:
ALL REDU WITH ( ATTRIB ADIR EQ U AND ATTRIB ADIR EQ D )
The logical expression to specify eccentric reducers in all the selected cases would be:
( ATTRIB STYP EQ ‘CON’ )
|
|
|
|
The default reducer in the Specification is eccentric. |
The rule specifies that reducers on vertical legs are concentric |
Positioning
There are two pseudo-attributes which are particularly useful in positioning expressions:
|
STAP |
is the length of straight tube before the component. |
|
STLE |
is the length of straight tube after the component. |
The lengths are measured from the component up to one of the following:
-
A change of direction
-
A change of bore
-
The start or end of the branch
-
One of the following components: VALV, VFWA, VTWA, FILT, PCOM, TEE and CROSS. (Any connection components such as flanges or gaskets are ignored.)
Downstream pipe requirement (DNSM)
Logical, can have Action
Used to control the length of straight pipe which is downstream from the previous component. If the rule logical fails, the action, if it exists, is applied. The action should be an expression that moves the component a distance from the previous to make sure a straight length of pipe. For example:
Selection
ALL TEE WITH ( ATTRIB APOS EQ ATTRIB LPOS )
Logical
( ATTRIB STLE GT ATTRIB ABORE * 10 )
You can omit the action by setting the Action field on the window to unset, but the result may be unpredictable, particularly if other rules are being applied, and it is not recommended. If no action exists, and component positioning is head relative, the component is moved 2/3 the distance along the leg, and then re-tested. If component positioning is tail relative, the preceding component is moved if necessary when it is positioned.
|
|
|
|
A Tee is positioned by default. |
|
|
|
|
|
The rule is applied and the Tee is moved 2/3 of the distance along the leg between the Elbow and the Routing Plane |
|
|
Upstream pipe requirement (UPSM) |
Logical, can have Action |
The rule controls the length of straight pipe which is upstream from the next component.
Selection
ALL TEE WITH ( ATTRIB APOS EQ ATTRIB LPOS )
Logical
ATTRIB STAP GT ATTRIB ABORE * 10
An example of an action is:
POLAR AXES PREVPP DIST 4 IN FROM PREVPP
where the POLAR AXES keywords are used to specify a position in terms of a distance in a given direction from a point, and PREVPP is the previous p-point.
You can omit the action by setting the Action field on the window to unset, but the result may be unpredictable, particularly if other rules are being applied, and it is not recommended. If no action exists, and component positioning is tail relative, the component is moved 1/3 of the upstream distance, and then re-tested. If component positioning is head relative, the following component is moved if necessary when it is positioned.
|
Elevation (ELEV) |
Logical, can have Action |
The rule controls the elevation of a component. The following example uses the CLOSEST keyword in the logical expression to specify that components must be positioned at a height greater or equal to 0.61m vertically above an EQUI whose purpose is FLOO.
Selection
ALL BRANCH MEMBERS
Logical
ATTRIB UP WRT CLOSEST EQUI WITH ( PURP EQ ’FLOO’ ) DOWN GE .61M
A position on the closest vertical segment of pipe equal to the required elevation is found. If no position on the existing pipe can be found, the action is applied with the position adjusted to minimize the use of bends or elbows.
If the logical test is False, any action set is applied.
|
Location (LOCA) |
Logical, can have Action |
Used to position a component at a given location. The following example is a test for a component in a sub-branch being positioned at p-point 4 of the connecting component in the owning branch:
ATTRIB APOS EQ ATTRIB PPOS 4 OF HREF OF OWNER
If the logical test fails, the action is applied and the test repeated. If it fails again, a message is output.
The corresponding action expression would be:
ATTRIB PPOS 4 OF HREF OF OWNER
To position the component at p-point 4 of the connecting component in the owning branch.
Orientation
|
Major axis |
Logical, no Action |
Controls the major orientation of the component, which is the arrive/leave axis. For example:
ATTRIB ADIR EQ D
If this fails, the component is moved to each leg in turn until one is found that passes. No action is allowed.
|
Minor axis |
Logical, can have Action |
Controls the minor orientation of a component, which is the axis perpendicular to the arrive/leave axis. Frequently this axis is the direction of a valve handwheel. For example:
ATTRIB P3 DIR EQ D
If the rule logical fails, the action is applied. If the logical then fails, the component is moved to another leg, and re-tested. If the component clashes, it is moved along the leg and then re-tested.
If there is no action, the component is rotated in increments of 90 degrees to find a non-clashing orientation which passes the rule. If after four attempts it still fails, the component is moved along the leg and retried. If no suitable positions are found on the leg, the component is moved to the next leg and the procedure repeated.
Examples using PML Functions
The following example shows how you can call PML functions for the Logical and Action expressions in a Minor Axis rule for positioning a Valve at and angle of 45 degrees.
First, the Logical expression is set to ( 'minological' ), which calls the following PML function:
define object MINOLOGICAL
member .CEREF is DBREF
member .RESULT is BOOLEAN
endobject
define method .RULEMETHOD()
!THIS.RESULT = false
if ( !THIS.CEREF.ADIR.east ne 0 ) then
!THIS.RESULT = ( !THIS.CEREF.PDIR[3].up eq - 0.707107 and !THIS.CEREF.PDIR[3].north lt 0 )
elseif ( !THIS.CEREF.ADIR.north ne 0 ) then
!THIS.RESULT = ( !THIS.CEREF.PDIR[3].up eq -0.707107 and !THIS.CEREF.PDIR[3].east gt 0 )
. . .
. . .
endif
endmethod
If the Logical test evaluates to False, that is, if P3 does not have the specified orientation, the Action is carried out.
The Action expression is set to ( 'minoaction' ), which orientates the P3 direction of the component:
define object MINOACTION
member .CEREF is DBREF
endobject
define method .RULEMETHOD()
if ( !THIS.CEREF.ADIR.east ne 0 ) then
ORI and p3 is s 45 d
elseif ( !THIS.CEREF.ADIR.north ne 0 ) then
ORI and p3 is e 45 d
endif
endmethod
|
Clash Exclusion (CLEX) |
Logical |
A Clash Exclusion rule allows certain clashes to be approved in advance. A use for this is specifying that only non hazardous pipes are allowed in certain areas. Clash exclusion rules can use expressions or functions.
Example using Expressions
For example, the following rule can be used where two groups of elements are always allowed to clash. In this case, Branches carrying radioactive material have their PURP attribute set to RADI. All Zones which are safe for humans to enter have their PURP set to HUMA. The rule allows all Branches whose PURP is not set to RADI to pass through all human zones:
Selection
ALL BRAN MEM WITH ( PURP OF BRAN NEQ ‘RADI’ )
Logical
( PURP OF ZONE EQ ‘HUMA’ )
The selection part of the rule is used to identify the Branch or Branch member which is clashing and the logical applies to the obstruction clashing with the Branches.
Example using a PML Function
If a more complicated solution is needed, use a PML function. A simple example is
define object CLASH
member .CEREF is DBREF
member .OBSREF is DBREF
member .RESULT is BOOLEAN
endobject
define method .RULEMETHOD()
!THIS.RESULT = false
if ( !THIS.CEREF.owner.name eq '/ROUTE2-1' and
!THIS.OBSREF.owner.name eq '/OBSTR42' ) then
!THIS.RESULT = true
endif
endmethod
Pipe Racks and Routing Planes
Automatic routing along Pipe Racks is described in Pipe Router. In summary, Pipe Router sees a Pipe Rack as a group of routing planes. Each plane has its FUNCTION attribute set, for example to UTIL for planes which are going to route utilities pipes. You should also make sure that Branches which are routed along Pipe Racks have their PURPOSE attribute set appropriately, so that you can identify which Branches should be routed along a given plane.
Note: In these rules, the selection expression selects Branches. The logical test is applied to the Planes on the Pipe Rack.
|
Travel Plane Selection |
Logical, no Action |
To control which travel plane of a pipe rack is used to carry a particular branch. An example of the selection expression, which would apply the rule to all Branches to with Purpose set to COOLING, is:
ALL BRAN WITH ( PURP EQ ’COOLING’)
An example of the logical test, which routes the selected Branches along the Plane with its Function set to UTIL is:
FUNCTION EQ ’UTIL’
Note: It is important to use the FUNCTION attribute in rule writing for the rule logical since the PURPOSE attribute is used internally.
|
Entry Plane Selection |
Logical, no Action |
To determine which entry plane is used to control a branch as it enters a pipe rack. Normally there is one above and one below, to allow for branches with both liquid and vapour contents to use the rack. An example of the selection might be:
ALL BRAN WITH ( PURP EQ ’COOLING’ AND :CONT EQ ’GAS’)
Note: That both the PURPOSE and:CONTENT attributes would need to be set on the branch for the rule selection to take effect.
An example of the test can be:
FUNCTION EQ ’UTIL’.
which would cause pipes containing gas for cooling to use the upper entry/exit plane to get to/from the UTIL travel plane.
Note: It is important to use the FUNCTION attribute in rule writing for the rule logical since the PURPOSE attribute is used internally.
|
Exit Plane Selection |
Logical, no Action |
The rule determines which exit plane is used to control a branch as it exits a pipe rack. Normally there is one above and one below, to allow for branches with both liquid and vapour contents to use the rack. An example of the selection might be:
ALL BRAN WITH ( PURP EQ ’COOLING’ AND :CONT EQ ’GAS’)
Note: That both the PURPOSE and :CONTENT attributes would need to be set on the branch for the rule selection to take effect.
An example of the test can be:
FUNCTION EQ ’UTIL’
which would cause pipes containing gas for cooling to use the upper entry/exit plane to get to/from the UTIL travel plane.
|
Shoe Height |
Real |
Branches routed via planes or pipe-racks can be offset by a user-specified distance from the plane to allow for shoe-heights. The shoe-height is specified using rules with PURPose SHOE.
For example:
Selection:
( ALL BRAN ALL BRAN MEM ) WITH ( ISPEC OF BRAN NE NULREF )
Action:
(PH OD * 0.25 )
Note: The Action specifies the distance from the Pipe OD. Subtract the insulation thickness if the shoe height if measured from the bottom of the Pipe.
|
Heavy Pipe |
Logical, no Action |
You can specify that heavy pipes are placed at the edges of routing planes and light ones at the center. When choosing this packing method, the PLPM attribute of the plane is set to WEIG, and Pipe Router looks for a weight rule to determine whether pipes are light or heavy.
The logical expression evaluates to False if the pipe is to be placed at the edge of the rack.
For example:
Selection:
ALL BRAN MEM
Logical:
( ATTRIB ABOR LT 300 MM)
All Pipes with Bore greater than 300mm are placed at the edge of the rack.
Refer to Packing Methods for further information on Pipe packing methods.
|
Extra Gap |
Real |
Allows you to specify an additional gap between some pipes, for example, very hot pipes.
Additional gaps are determined by rules applied to the default bend or elbow of a branch. For example, for branches with temperature greater than 500 degrees, the following rule gives an additional gap of 0.2 times the arrive bore of the component:
Selection:
ALL BRAN MEM WITH ( TEMP OF OWNER GE 500 )
Action:
( ATTRIB ABOR * 0.2)
For more details of additional gaps, see Additional Gaps.
|
Flange Width (FLWI) |
Real |
Flange width rules are used to set the gap between Pipes on Routing Planes and Pipe Racks when the Pipe run on the plane includes Flanges. The rule is applied to the default Flange for the Pipe. The gap can be calculated in several ways.
Example 1
Selection:
ALL FLAN
Action:
( 0.25 * ATTRIB ABORE )
Example 2
Uses flange parameters:
Selection:
ALL FLAN
Action:
ACTION ( CPARA[2] + CPARA[3] )
Example 3
The next example uses a property of the Flange, which would be specified in a dataset:
Owner /FLANGE.DATA.SET
Description Flange width Property
DKEY FLWI
Ptype BORE
Pproperty ( ATTRIB ABOR * 1.5 )
Dproperty 0
Purpose unset
Number 0
Dtitle unset
Punits mm
Ruse 0
The rule can then be:
Selection:
ALL FLAN WITH ( PSPE EQ /A150)
Action:
ACTION ( PROP FLWI )
Refer to Flanges on Routing Planes for further information on how Flange widths are calculated.
Post-processing
|
Post-processing (POPR) |
Logical, will have Action |
All rules with this Purpose are executed after a Branch has been successfully routed. They can be used to add extra details to a Branch such as Drains and Vents or slope the line. The Action is normally a PML function, which must have been defined before the rule is applied.
The following example creates an expansion loop:
define object POSTPROCESS
member .CEREF is DBREF
endobject
define method .RULEMETHOD()
exit
$!THIS.CEREF
new elbo
select
ori and pl is up
dist 1000
rloc 2
new elbo
select
ori and pl is $!THIS.CEREF.LDIR
dist 300
rloc 2
new elbo
select
ori and pl is d
dist 300
rloc 2
new elbo
select
ori and pl is $!THIS.CEREF.LDIR
dist 300
rloc 2
router
endmethod
The following illustrations show a Branch, with and without the Post-processing Rule applied.


Create and Edit Routing Rules
AVEVA E3D™ 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
AVEVA E3D™ 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 are 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 you 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 to display the Routing Rules window. Select Create > Rule World to display the Create Rule World window. In the Name box, input a name for the rule world, click OK to create the Rule World.
The rule world is created and displays in the Members List. Create a rule set within the rule world.
To create a rule set:
Make sure 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 to display the Create Rule Set window. 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 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 displays 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 to display the Create Rule window. 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 displays 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 displays 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.
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:
Set the extent of the test (World, Site, Zone, Pipe), from the Test Rule drop-down list, which performs 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 displays in the Rules Testing window.

Click OK to create the routing rule. You 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 to display the Create Copy Rule window.

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 displays in the design hierarchy.
Click OK to name the copied element and close the Create Copy Rule window and display the Rule Attributes window.
Click Cancel to discard inputs and close the Create Copy Rule window
When you create a copy of a rule, the Rule Attributes displays, filled in with the details of the copied rule. You can then 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
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 Pipe Router.
Using Rules to Specify How Pipes Use a Pipe Rack
Specify the type of pipes routed 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 displays and is 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
-
To view the pipe attributes, with the pipe selected as the CE, on the Piping tab, in the Common group, click Attributes list to display the Attributes window.

Select Purpose from the list of attributes. In the Value column, input PROC.
Press the Enter Key and the Purpose row is highlighted to indicate that the update has succeeded.
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 to display the Rule Testing window, 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:
|
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 window. Select Settings > Branch Rules from the menu on the AVEVA E3D™ Router window. On the Branch Rules window, set Apply rule sets to All Selected Branches. Select HIGH, and the rule is added to the window.
Now re-route the Pipe. A more satisfactory route is obtained.
Deleting a Rule World, Rule Set or Routing Rule
To delete a rule world, rule set, or routing rule, navigate to the rule world and rule set to be deleted from the Current Rule World and Current Rule Set drop-down lists. Select the rule to be deleted from the routing rules list. Select Delete > Rule World, Delete > Rule Set or Delete > Rule, as required.
Placing Pipes on Racks and Planes
The section describes how to set up rules which control:
-
How spacing between Pipes on pipe racks and routing planes is calculated from Flanges on the Pipes.
-
How the weight of a Pipe can affect Pipe Rack Packing.
-
Shoe Height.
Flanges on Routing Planes
By default, Pipe Router runs pipes along Routing planes with the wall-to-wall Pipe Gap given on the Pipe Router Defaults window. Refer to Pipe Router for further information.
If you need to run sections of Pipes which include Flanges along routing planes, you can specify that the gap value is applied as a wall-to-flange (WF) gap, if the flanges can be staggered, or as a flange-to-flange (FF) gap, if the flanges are side-by-side on the plane. The default is wall-to-wall (WW) spacing. The spacing is controlled by the PLWW attribute of the RPLA. PLWW can be set to WW, WF or FF.
If WW or WF spacing is specified, the Pipe Router looks for rules of type FLWI and apply them. The size of flange is found using the Flange Width (FLWI) rule, which is applied to the default flange (for example, the flange which is obtained with an AVEVA E3D™ SELECT) for each branch at its current bore, even if there are other flanges on the pipe rack.
-
When wall-to-flange spacing is used, the greater of the flange widths for the current pipe and the adjacent pipe is added to the wall-to-wall spacing.
-
When flange-to-flange spacing is used, the flange width of both pipes is added to the wall-to-wall gap.
Note:
The flange width taken as 0 if:
-
No flange width rule is applied.
-
Either branch does not have a default flange.
If necessary, specify an additional pipe-specific gap, for example, for very hot pipes.
Example of Wall-to-Flange Spacing
If a rule is used, so that the flange width is set to 1.5 x bore, then wall-to-flange spacing is calculated:
The constant gap is set to 50mm. Then the center of an insulated branch of OD 200mm, bore 100mm would be placed 435mm from the center of an adjacent branch of OD 150mm, bore 140mm.

Example of Flange-to-Flange Spacing
If the rule sets the flange width to 1.5 x bore, then flange-to-flange spacing is calculated:
|
½ OD Pipe A |
100 |
|
Flange width Pipe A |
150 |
|
Gap |
50 |
|
Flange width Pipe B |
210 |
|
½ OD Pipe B |
75 |
|
Total |
585 |

Packing Methods
There are two packing methods available. Pipe Router either places a pipe on a plane as near as possible to the edge of the plane, or packs heavy pipes at the edges of racks and light ones at the center. The packing method is an attribute of the Routing Plane. It can be set for the Travel Plane of pipe-racks and for individual planes.
Select the By Weight method, the PLPM (Plane Packing Method) attribute of the plane is set to WEIG, and Pipe Router looks for a weight rule, (PURP set to WEIG), to determine whether pipes are light or heavy.
You can use weight rules to determine whether pipes are packed at the top or bottom of vertical planes
Horizontal Routing Planes
In the weight-related packing method on horizontal planes, for heavy pipes Pipe Router searches inwards from both edges looking for a free slot with a large enough gap between it and any adjacent pipe. The heavy pipe is placed closest to whichever edge a slot is found. For light pipes Router first looks in the middle of the plane or rack to see if this slot is free. Router then searches in both directions outwards looking for a free slot and use the closer to the center. Pipes for which no rule exists are treated as light pipes and placed in the center of the rack or plane.
Vertical Routing Planes
The weight-related packing method can also be applied to vertical routing planes with a horizontal travel direction. If the weight-related packing method is used then, for light pipes, Pipe Router searches downwards from the top edge of the routing plane edges looking for a free slot with a large enough gap between it and any adjacent pipe. For heavy pipes Pipe Router searches upwards from the bottom edge of the plane. Pipes for which no rule exists are treated as light pipes.
-
You cannot use weight-related packing for a vertical plane with a vertical travel direction.
Example of Weight-related Packing
If the third and sixth pipes to be packed on a rack are ‘heavy’ and the others are light, the placement of pipes is:

Additional Gaps
Sometimes certain pipes need to be placed further than others from their neighbours. Process pipes might need to be separated more than utility pipes. Extra-hot pipes, or pipes which need tracing where the tracing has not been represented by the insulation, should have wider gaps beside them.
The size of any additional space required can be found using an additional gap rule (Purpose ADGP) applied to the default bend or elbow of each branch at its current bore.
Example
Assume WF spacing is used, with a rule that the flange-width is 1.5 x bore and that you have a constant 50mm gap. Then the center of an insulated branch of OD 200mm, bore 100mm, extra gap 20mm would be placed 465mm from the center of an adjacent branch of OD 150mm, bore 140mm extra gap 10mm.

Shoe Heights
Branches routed via planes or pipe-racks can be offset by a user-specified distance from the plane to allow for shoe-heights. You can specify the shoe-height using rules.
The Rules should have PURPose ‘SHOE’. Rules with purpose ‘SHOE’ do not have a logical part. Their action is a real expression giving the shoe height.
Note: The Shoe Height is calculated from the bottom of the pipe not the insulation.
The real value (h) returned from a shoe height rule is used to specify the height, above a rack or plane, of the bottom of the insulation. However, you may wish to specify a shoe height (H) with respect to the bottom of the pipe itself, which displays in the following diagram:

Using the shoe height rule, you can specify the shoe height as the expression:
h = H - ½ ( Insulation parameter[1])
Example
Rule with shoe height H of 200mm:
Selection:
( ALL BRANCH ALL BRANCH MEMBERS ) WITH ( NOT UNSET ( ATTRIB IPAR[1] ) )
Action:
( 200mm - 0.5 * ATTRIB IPAR[1] )
Importing Data from P&ID Files
If the P&ID system is configured so that it is capable of outputting data for use in AVEVA E3D™, you can load the P&ID file into Pipe Router. The section describes which attributes must be set before the P&ID data can be imported, and also the P&ID file format.
Note: The P&ID file is imported by selecting Create > New Pipes From P&ID. The P&ID Import window displays.
Attribute Settings
Make sure that the following branc and component attributes are set.
Branch Attributes:
|
Pspec |
Piping Specification to use |
|---|---|
|
Ispec |
Insulation Specification to use |
|
If the head connects to another branch, set: |
|
|
Href |
Name of the element to which the head connects. |
|
If the head is unconnected (Href is unset), set: |
|
|
Hbor |
The bore of the head. |
|
Hcon |
Connection type of the head. |
|
Lhead |
TRUE - indicates that Hpos is a valid position. |
|
Hpos |
The position of the head. |
|
Hdir |
Direction of the head. |
|
If the tail connects to another branch, set: |
|
|
Tref |
The name of the element to which the tail connects. |
|
If a tail is unconnected, set the following attributes: |
|
|
Tcon |
Connection type of the tail. |
|
Tbor |
The bore of the tail. |
|
If the tail is unconnected (Tref is unset), then you does not need to set its position. If the tail’s position is fixed, set: |
|
|
Ltail |
TRUE - indicates that Lpos is a valid position. |
|
Tpos |
Position of tail |
|
Tdir |
The direction of the tail. |
Alternatively, leave both Ltail, Tdir, and Tpos unset. In this case, Pipe Router calculates the position based upon the components in the branch, and any component and tube rules that apply.
Component Attributes
The Spref attribute must be set.
The Neutral Description Language
A neutral description language is used to extract an intermediate ASCII file from the P&ID system and then used to recreate the P&ID in AVEVA E3D™ for use with Pipe Router.
Before attempting to create a neutral flat file, be aware of the following points:
-
All characters must be in upper case, except for names of elements, which can be standard AVEVA E3D™ format (/Pipe-1-B2).
-
All comments take up one line and have two hyphens and a space as the first three characters.
-
You can insert blank lines, if required.
-
Use the space bar and tab to create space between fields and commands.
When a pipe or branch is created, the first command you must enter is START, which enters set-up mode. Any elements that are created whilst in set-up mode belongs to the significant element specified in the last START command.
The general format of the file is:
START PIPE /pipe_name...
START BRANCH /branch_name...
...elements...
END
START BRANCH /branch_name...
...elements...
END
END
Where element can be one of the following types:
CAP
INST
REDU
TEE
VALV
VENT
OLET
For example:
-- Here is a simple example of a neutral flat file.
START PIPE /Pipe2 PSPEC /DDD BORE 200 ISPEC /A1D
START BRANCH /branch-1 HREF /PUMP1/N1 TREF /VESS1/NOZZ2 BORE 150
TEE /TEE3 80
VALV /VALVE2 GLOBE
END
END
Before performing an import, you must create the equipment that is required, which enables the pipes to set the HREF and TREF on the nozzles of the equipment. It is assumed that the nozzle names are the same in both the P&ID and AVEVA E3D™.
Each file must contain one or more pipes. Each pipe must have one or more branches. It is up to the P&ID system to decide what is a branch and what is a pipe. The following figure shows a simple P&ID.

The diagram can be represented as:
-
PipeA, PipeB, PipeC and PipeD
or
-
Pipe1/B1 (A), Pipe 1/B2 (B), Pipe1/B3 (C) and Pipe1/B4 (D).
Command Syntax for P&ID Neutral Flat Files
Anything in lower case is one of the following:
|
value |
Positive or negative real number |
|---|---|
|
integer |
Positive integer |
|
logical |
TRUE or FALSE |
|
nl |
New line |
PIPE
>-START PIPE /pipe_name -+------------------.
| |
‘-PSPEC pipe_spec -+-------------.
| |
‘- BORE value +--cont
continued >--+- ISPEC -- insulation_spec .
| |
|- TSPEC -‑ tracing_spec ----|
| |
|- PSPEC ‑- pipe_spec -------|
| |
|- INSU ‑- value ------------|
| |
|- PRES -- value ------------|
| |
|- attribute -- value -------| .--------.
| | / |
‘----------------------------+- nl -*- branch -+- END ->
|
where |
branch |
is the syntax to define a branch, see below |
|---|---|---|
|
attribute |
is any Pipe attribute |
|
|
INSU value |
is the thickness of the insulation. |
BRANCH
>-- START BRANCH /branch_name HREF /name ‑--> continued
continued ---+-----------------------------.
| |
|- BORE integer --------------|
| |
|- PSPEC pipe_spec -----------|
| |
|- ISPEC insulation_spec -----|
| |
|- TSPEC tracing_spec --------|
| |
|- INSU insulation thickness -|
| |
|- PRES -- value -------------|
| |
|- attribute -- value --------|
| |
|- TREF /name ----------------’
|
|
| .-------<-------.
|/ |
*---- element ----'
|
‘---------------- nl -- END ->
where element is any of the following:
|
CAP |
/pipe_name/cap_name |
stype |
|
|
REDU |
/pipe_name/reducer_name |
stype |
value |
|
TEE |
/pipe_name/tee_name |
stype |
value |
|
VALV |
/pipe_name/valve_name |
stype |
|
|
VENT |
/pipe_name/vent_name |
stype |
|
|
INST |
/pipe_name/inst_name |
stype |
|
|
OLET |
/pipe_name/olet_name |
stype |
Note
-
The STYPE set for each element can be omitted if a default STYP is set in the specification. For example, a Tee can be specified by either:
TEE /tee-1 T-Type 200
or
TEE /tee-1 200
if the default STYP is set to T-Type. It is recommended that specifications are set up with default STYPs so if the STYP is missing in the flat file a valid component is still selected and Pipe Router can route it.
In each case, element can optionally be followed by options from one or both of the following:
>----+--- PBOre integer ---------.
| |
|--- ANgle -----------------|
| |
|--- RAdius ----------------|
| |
|--- ABOre -----------------|
| |
|--- ISPEC insulation_spec -|
| |
|--- TSPEC tracing_spec ----|
| |
|--- LBOre -----------------|
| |
|--- PREssure --------------|
| |
|--- TEMperature -----------|
| |
‘--- RATing ----------------+--- uval -->
>----+--- STYpe -----------------.
| |
|--- TYpe ------------------|
| |
|--- ACOnn -----------------|
| |
|--- LCOnn -----------------|
| |
|--- PCOnn integer ---------+--- word --.
| |
‘--- word ------------------+-- value --|
| |
‘-- word ---+--->
-
value is the new bore of the pipe for a Reducer (or enlarger), and the P3 bore for a Tee. Any change in bore along a branch can be specified by the BORE keyword. For example:
START PIPE /P-1 BORE 200
START BRANCH /B-1 BORE 100
REDU /R-1 BORE 50
END
END
-
The bores at P1, P2 and P3 can be set individually. For example:
TEE /T-1 PBORE1 100 PBORE2 50 PBORE3 50
-
If a component is at a different bore to the rest of the pipe, for example, a reducing valve, its PBORE0 can be set. AVEVA E3D™ Router inserts a reducer automatically when routing the pipe. An example of this syntax is:
BRANCH /B-1 HREF /NOZZ-1 BORE 100
VALV /V-1 GATE PBORE0 50
END
If the PBORE0 is set on a REDU along with the BORE, it is ignored.
-
The tracing and insulation specifications can be set with the syntax:
element TSPEC /tspec-1 ISPEC /ispec-1
-
Elements that appear in more than one branch are only created once. For example: Valve /V-1 is included in branch /B-1 and /B-2. Branch /B-1 has its TREF set to /V-1 so the valve does not appear in /B-1. It is assumed /V-1 is an inline component for /B-2.
Example of a Neutral Flat File
Below is an example of a typical neutral flat file. Different style layouts display for each pipe.
-- File to test import from P&ID to E3D Design
—- Pipes from Sheet X
START PIPE /PIPE1 PSPEC /A3B BORE 300 ISPEC /XXX INSU 100
START BRANCH /first_branch HREF VESSEL1/NOZZ1/ TREF PUMP1/NOZZ1
VALV /VALVE1 GATE
REDU /REDU1 200
TEE /TEE 200
TEE /Tee-2 PBORE3 200
VALV /VALVE2 GLOBE
CAP /CAP1 OPEN
END
START BRANCH /second_branch HREF VESSEL1/NOZZ2 TSPEC /t-spec
VALV /GATE_VALVE GATE
REDU /REDU2 CONC 200 ISPEC /I-spec TSPEC /T-spec
END
END
START PIPE /PIPE2 PSPE /A1D BORE 200 ISPEC /DDD INSU 50
START BRANCH /branch-1 HREF /NOZZ3 TREF PUMP1/NOZZ3 BORE 150
TEE /Tee3 TEE-TYPE PBORE3 50
END
START BRANCH /branch-2 HREF VESSEL1/NOZZ4 TREF PUMP1/NOZZ4
VALV /Valve-safety1 GLOBE
REDU /R-1-1 BORE 100
END
END
Command Syntax
The syntax used in Pipe Router is to allow customers to build Router into their own systems, especially batch input, and to adapt the standard Applicationware. For most users, this should not be necessary as all important functionality is available via Applicationware.
These commands can only be used in ROUTER mode. To switch to Router, give the command:
ROUTER
The following errors result if Router is not available.
|
(61,701) |
Cannot open router DSO due to:- <TEXT> |
|
(71,702) |
Incorrect Router Library version. It is <INT> but should be <INT> |
|
(61,791) |
No licences available for Piperouter |
|
(61,792) |
Piperouter security error <INT> |
|
(61,792) |
Piperouter security error |
To return, give the command:
EXIT
Note on element identifiers
Use names as element identifiers.
-
If a reference is output and then re-input, it can result in an invalid reference.
-
Avoid referring to Elbows using "ELBO n of /B1": Pipe Router re-creates Elbows every time a Branch is re-routed, and the numbering can easily get changed.
Conventions Used in the Syntax Graphs
The commands described in this chapter are presented in the form of syntax graphs.
-
Commands display in a combination of uppercase and lowercase letters, where the capital letters indicate the minimum abbreviation.
Note: The convention does not mean that the second part of the command must be typed in lowercase letters; commands may be entered in any combination of uppercase and lowercase letters.
-
For example, the command ICONSTraint can be input in any of the following forms:
ICONST
ICONSTR
ICONSTRA
ICONSTRAI
ICONSTRAIN
ICONSTRAINT
-
Commands that display in all uppercase letters cannot be abbreviated.
-
Command arguments display in lowercase letters. These are just descriptions of what you are required to enter. For example:
CLEAR n
-
means that to remove the constraint number 3, enter:
CLEAR 3
-
Syntax graphs are read from top left to bottom right. The start point displays as >, and you can follow any path through the graph until the exit point is reached, which displays as >.
-
Points marked with a plus sign (+) are option junctions which allow you to input any one of the commands to the right of the junction. For example:
>----+--- ABC -----.
| |
|--- PQR -----|
| |
‘-------------+--->
-
means you can type in ABC or PQR or just press Enter to get the default option.
-
Text in angle brackets <. . . > is the name of another syntax graph. The convention is used for syntax which occurs in many places. The graphs referred to are described at the end of this section. For example:
>----+--- ABC -----.
| |
|--- PQR -----|
| |
|--- <dia> ---|
| |
‘-------------+--->
-
means you can type in ABC or PQR or any command allowed by the syntax given in diagram <dia> or just press Enter to get the default option.
-
Points marked with an asterisk (*) are loop back junctions. Command options following these may be repeated as required. For example:
.-----<-------.
/ |
>---*--- option1 ---|
| |
|--- option2 ---|
| |
‘--- option3 ---+--->
-
means that you can enter any combination of option1 and/or option2 and/or option3, where the options can be commands, other syntax diagrams, or command arguments.
-
The simplified format:
.----<------.
/ |
>---*--- name ----+--->
-
means that you may type in a list of AVEVA E3D™ names, separated by at least one space.
Standard Syntax Graphs
Some graphs contain references to other, standard syntax graphs which are widely used throughout DESIGN. References to standard syntax graphs display in angle brackets:
<example>
Refer to Model Reference for further information.
Ordering and Routing Branches
Ordering is required when routing a number of branches so that the main branches are routed first before sub-branches such as drains and vents, which requires two commands:
ORDER---<SELATT>-+--<SELATT>---.
| |
‘-------------+-->
and then
VAR <VARNAME> ROUTE ORDer
Can give the following error
(61,723) Could not order <REF> for routing
The ORDER command returns a collection of branch references sorted so that the main branches are first.
A network of branches for a given branch can also be found with the command:
VAR <VARNAME> ROUTE NETwork name
And then to route the branches:
ROUTE --- <SELATT>-+--<SELATT>---.
| |
‘-------------+-->
If no branches or pipes are in the selection you receive the following error:
(2,563) Wrong element type
Branch Constraints
A route can be constrained to pass through points, along planes or to use pipe racks with the following syntax. The current element must be a Branch.
Points
NEW POINT -+- AT <DOPE>-+-DIRection <DOPE>-+-LEAVedir <DOPE>-+-AFTER name -.
| | | | |
‘- name -----+------------------+-----------------+-------------+-->
Creates a point in space with optional arrive and leave directions after either the head of the bran or one of its members.
Planes and Racks
NEW PLANE name AFTER name --+-- LAST name ---.
| |
‘----------------+-->
A plane should be defined by referencing a RPLA. When using a RPLA, the direction of travel is fixed as the X direction for single planes and travel planes and Y direction for entry and exit planes.
For a rack the first name should be an RPLG which owns at least one RPLA with PURP PREX (that is, an entry/exit plane) and at least one RPLA with PURP not set to PREX (the travel plane).
To remove a constraint use:
CLEAR -+---- n ----.
| |
‘---ALL ----+-->
To move one constraint after another in the branch list.
REORDer -- n ---+--AFTER---.
| |
‘--BEFORE--+--<INT> ->
To move a constraint to after a different component in the branch list.
EDIT -- n ---+--AFTER--- name ->
To query constraints:
Q ICONSTraint NUMBer
returns the number of point and plane constraints for a branch.
Q ICONSTraint TYPE <INT>
returns the type for a given constraint.
Q ICONSTraint POINt <INT>-+--POSition ---------------------------.
| |
|--DIRection --------------------------|
| |
|--LEAVdirection ----------------------|
| |
|--COMPonent --------------------------|
| |
|--RELAtion ---------------------------|
| |
|--ACTUal-+--POSition------. |
| | | |
| |--DIRection-----| |
| | | |
| ‘--LEAVdirection-+-WRT name -|
| |
| |
‘--------------------------------------+->
To allow the component parts of a point constraint to be queried. As the position and directions can be stored as expressions, the ACTUAL command returns the calculated values.
Note: RELATION and FIXED need not be queried as they are always respectively AFTER and FIXED.
If a DATUm is used as a point constraint, its position can be found by exiting from Router and querying its attributes in the normal manner.
Q ICONSTraint PLANe n ---+-- STARt --------------------------------.
| |
|-- FINIsh -------------------------------|
| |
|-- DIRection ----------------------------|
| |
|-- COMPonent ----------------------------|
| |
|-- LAStconent ---------------------------|
| |
|-- RELAtion -----------------------------|
| |
|-- RPLAne -------------------------------|
| |
|-- ACTUal -+--STARt ---. |
| | | |
| |--FINIsh --+-- WRT name -. |
| | | |
| ‘--DIRection -------------+---|
| |
|-- ACTUal -------------------------------|
| |
|-- FIXed --------------------------------|
| |
‘-----------------------------------------+-->
Since a plane is defined using a RPLA, its dimensions are found by exiting from Router and querying its attributes in the normal manner.
Configuration
Allows the behaviour of Router to be modified. It has the following syntax:
CONFiguration -+-- ERROR <WORD> ------|
| |
|-- DIRection <WORD> --|
| |
|-- PRSP <REAL> -------|
| |
|-- PRRO <REAL> -------|
| |
|-- ORDER <WORD> ------|
| |
|-- MODE <WORD> -------|
| |
‘-- ITERation-- n -----+-->
ERROR can be set to MESS, in which case extra diagnostic messages are output during routing.
DIRECTION can be set to BEND, ELBO or RULE and allows the change of direction elements to be specified.
PRSP is the basic gap for pipe-rack spacing.
PRRO is the gap rounding value for pipe-rack spacing.
ORDER, MODE and ITERATION are not currently used in core AVEVA E3D™ Router, but can be used for the appware.
To query configuration setting, use:
Q CONFiguration -+-- ERROR -------.
| |
|-- DIRection ---|
| |
|-- PRSP --------|
| |
|-- PRRO --------|
| |
|-- ORDER -------|
| |
|-- MODE --------|
| |
|-- ITERation ---|
| |
‘----------------+-->
General Rule Setting
The following syntax is for setting the SELECTION, LOGICAL and ACTION attributes of GRULES. The current element must be a GRULE.
GENEral RULEs SELEction <SELATT>
GENEral RULEs LOGIcal <EXPZL>
GENEral RULEs ACTIon <EXPRG>
GENEral RULEs ACTIon UNSET
To query the attributes set:
Q GENEral RULEs SELEction
Q GENEral RULEs LOGIcal
Q GENEral RULEs ACTIon
Rules can be used for routing in two ways. They can be SET, which means that a selection of GRULEs are set and then used in subsequent routing during the design session. Alternatively, rules can be STORED, which means that the same GRULES are used in future routing, thus maintaining design intent. To specify which:
GENEral RULEs USE --+--SET-----.
| |
‘--STOREd--+-->
To SET rules:
GENEral RULEs SET -+-HIGH-.
| |
|-LOW--|
| |
‘------+-APPEnd------.
| |
|-OVERWrite---|
| |
‘-------------+-<SELATT>-+-<SELATT>-.
| | |
‘----------+----------+->
The defaults are LOW priority and OVERWRITE.
Rules can then be UNSET with the following syntax.
GENEral RULEs UNSET --<SELATT>--+--<SELATT>---.
| |
‘-------------+-->
To query the set rules, the following syntax returns an array of GRULE references and their priority.
VAR <VARNAME> GRULEs SET
To STORE rules, the current element must be either a Bran, Pipe, Zone or Site. The stored rules then apply to branches owned by that element. However, when determining which rules to use, the program navigates up until it finds some rules to apply. Thus, if rules have been saved for Zone and Site say, then only the Zone rules is used.
GENEral RULEs SAVE -+-HIGH-.
| |
|-LOW--|
| |
|------+-<SELATT>-+-OVERWrite --.
| | |
| |--APPEnd ----|
| | |
| ‘-------------|
| |
‘-- SET ------------------------+-->
The defaults are LOW priority and OVERWRITE.
To query the rules saved:
Q GENEral RULEs SAVED
To remove the saved rules for a particular element:
GENEral RULEs UNSAVE
Rule Testing
As writing rules is not always straightforward, the following functionality is provided to provide feedback.
To test a branch member to see what rules apply to it and whether it passes them:
VAR <VARNAME> GRULEs TEST --+--<WORD>---.
| |
‘-----------+-->
The word is the type of rule to be tested, for example, MAJO, MINO, and if not specified, all rules are tested.
To test plane rules the current element needs to be the branch to be tested.
VAR <VARNAME> GRULEs PLANE name
where the GID is the RPLG to be tested. The returned results are the travel, entry and exit planes.
A branch member can also be tested by applying the action part of a rule to it with:
GENEral RULEs APPLY WORD
The word is the type of rule to be tested, for example, MAJO, MINO. Note if the element passes the rule already, then no action is carried out.
Router Banner
Pipe Router has its own banner which can be queried (in Router mode) with the command:
Q BANNer
Special Router Attributes
There are a number of special attributes used by Pipe Router. These are described below.
RLOC
Attribute of branch members. Determines whether element is to be deleted or repositioned by Router.
|
RLOC = -1 |
Unset |
|---|---|
|
RLOC = 0 |
Non-deletable and positionable. |
|
RLOC = 1 |
Locked |
|
RLOC = 2 |
Deletable |
HREL
Attribute of branch members. Logical. Determines if component should be placed as near to Head as possible (TRUE) or as close to Tail as possible (FALSE). If a component is tail-relative it forces all components between it and the next locked component or constraint towards the Tail. The default is TRUE.
BRLO
Attribute of branch set and used by Pipe Router. You should not normally set BRLO. If you are routing a branch which has already been positioned, it is better to unset BRLO and then set LHEAD and LTAIL as appropriate. Indicates whether the head and /or tail of branch is fixed or free. If the head / tail is connected to a nozzle or a piping component the value of BRLO is ignored.
If the HREF is unset then the head must be positioned (LHEAD true) and the head of the branch is fixed. Thus the head lock is only relevant when the head is connected to the tail of another branch. If the head is fixed the tail of the connected branch is positioned where the head of this branch is, but if the head is not fixed the head of this branch is positioned at the tail of the connected branch.
If TREF is unset the tail can be positioned and the tail of the branch fixed; or the tail can be free -when Router calculates a position for it. When the tail is connected to the head of another branch it is positioned where the head of that branch is unless the tail is fixed.
Note: Pipe Router does not consider the possibility of branches connected head-to-head or tail-to-tail).
|
BRLO = 0 |
unset; Router uses LHEAD / LTAIL to calculate BRLO if necessary |
|
BRLO = 4 |
free head and free tail |
|
BRLO = 5 |
fixed head and free tail |
|
BRLO = 6 |
free head and fixed tail |
|
BRLO = 7 |
fixed head and fixed tail |
If BRLO is not set before calling Router, then HREF, LHEAD, TREF and LTAIL attributes are used to set to a suitable value.
BRSTATUS
The setting of the BRSTATUS (Branch Status) attribute shows the routed status of the Branch. These values can be used in Autocolour rules so that Branches can display in different colours according to whether they have been routed successfully or not. The values are:
|
0 |
Not Routed |
|
1 |
Routed successfully |
|
2 |
All routes clash - Using default |
|
3 |
Clash using route |
|
4 |
Route breaks rule |
|
5 |
Routed ignoring invalid constraint list |
|
6 |
Cannot find required component - Datacon fails |
|
7 |
System error - Unable to route branch |
|
8 |
Serious data error - Unable to route branch |
|
9 |
Error whilst routing branch |
|
10 |
Route violates minimum tube length |
PLPP
Attribute of RPLA. Shows where on a plane to place branches.
|
PLPP = ABOV |
place above the plane |
|
PLPP = BELO |
place below the plane |
|
PLPP = CENT |
place at the center of the plane |
The default is CENT.
PURP - (RPLA)
For pipe racks, indicates which are entry/exit planes.
PURP = PREX - Entry/exit plane
If not set to PREX, then it is assumed to be a travel plane.
PURP - (GRUL)
The PURP attribute of a GRULE indicates the type of rule.



