In PlantSpace P&ID the pipe runs are not handled correctly. This can lead to problems when converting the dgn to OpenPlant PowerPID. Especially the 3way and 4way valves are not handled correctly.
To correct the grouping of pipe runs at 3way and 4way valves the $GROUPING_NODES property needs to be modified and a new rule must be introduced. Also the processing commands need to be adjusted
By default $GROUPING_NODES is set to -1 and the valve is grouped with all pipe segments into a line group. This rule resets the $GROUPING_NODES so only the connect points 0 and 1 are connecting. At first when the pipelines (PID_LINE) are grouped the $GROUPING_NODES are set to -1.After this the expression ("MEMBER_OF","","PID_LINE") is TRUE and after an update on the valves was performed the GROUPING_NODES are reevaluated and assigned with the new values. A new update command needs to be inserted before the pipe runs are grouped.
The following description is optimized for the standard_PDB workspace.
Launch the JSpace ClassEditor
Open the class libraries class_standard_pdb.lib (note: this is a fundamental change and not a user defined change and is therefore not done in class_standard_pdb_user.lib)
Doubleclick class HVALVE, class HVALVE and its properties are displayed
Double click the $GROUPING_NODES property, The Property Editor is displayed
At the bottom click the If button
An inference source is added
Select the inference source and click the up-arrow button twice to promote the inference source to the top of the list
In the drop-down menu “List of:” switch to Rules
Click the Add.. button to create a new rule
The Rule Editor is displayed.Add the following Rule:
IF (SUB_TYPE == "3WAY" OR SUB_TYPE == "PLUG3" OR SUB_TYPE == "4WAY" OR SUB_TYPE == "PLUG4") AND RELATED("MEMBER_OF","","PID_LINE") THEN $GROUPING_NODES=1;$GROUPING_NODES=0
Repeat the steps for class CVALVE
Save the class library
A new command must be added to the processing script to update the $GROUPING_NODES property. It needs to be placed before the Group Runs command.
JUPDATE 0 `CLASS("CVALVE","HVALVE") and (SUB_TYPE == "3WAY" OR SUB_TYPE == "PLUG3" OR SUB_TYPE == "4WAY" OR SUB_TYPE == "PLUG4")`
This is the string to be inserted into the Parameters field:
$JSM `CLASS("CVALVE","HVALVE") and (SUB_TYPE == "3WAY" OR SUB_TYPE == "PLUG3" OR SUB_TYPE == "4WAY" OR SUB_TYPE == "PLUG4")`