Enforcing Minimum Lengths for Piping [TN]


Document Information

Document Type: TechNote

Product(s): AutoPLANT Piping

Version(s): All

Original Author: Jesse Wolfe; Bentley Technical Support Group

Overview

Many industry standards specify a minimum length between welds for Pup pieces and other Piping.  This is sometimes a ratio to a Pipe dimension, while in other cases it a strict Minimum length restriction.  AutoPLANT currently enforces no such limitation by default.  The steps below entail how to add such a restriction to the Piping application.  The first steps provided add a rule establishing a minimum length of 6 times a Pipe's wall thickness (or Outside Diameter-Inside Diameter).  Secondly, steps are provided to enforce a strict minimum length restriction of 3 units(depending on Project Units).  Finally, additional steps are provided for users who wish to exclude from the length restriction Socket Depth and Thread Engagement for components with applicable end conditions.

Keep in mind that this can be done Project specific or for your entire install (Changes made will be specific to one module and must be repeated for each desired module.  For purposes of this example we will use the base module).

To enforce change for a single Project :

In order to make this a Project Specific customization, you will need to create the following Folder structure in the Project and copy the Pipe.EBS file from your install (location in step below):

%NetworkRoot\%ProjectRoot%\%ProjectName%\Config\modules\Base\Piping\Draw

To enforce change for all Piping:

(If you have elected to change only  a single project, skip this step)  To customize your entire install, you will make changes (after making a backup copy) to the Pipe.EBS file found in the following location:

%NetworkRoot%\Program Files\Bentley\Plant XM\Modules\Base\piping\draw

Changes to the Pipe.ebs:

To Create a Minimum Length to Wall Thickness ratio:

Once you have placed the pipe.EBS file in its proper location, open the EBS file and make the changes described below using the Script Editor Tool or notepad if you prefer:

  1. Find the Function Description: Draw Pipe in 3D space (line 75)

Below it, in the Sub pipe_draw3D section, add the following line:

Dim pipeID            As Double                           '// Pipe Inside Diameter

Below this, add the following line:

status = at_Component_getReal (pipeID, compID, "PIPE_ID_M")

If(CompLen < ((pipeOD-pipeID) * 6)) Then

      Msgbox"Pipe Length Must Be a Minimum of 6 times its Wall Thickness or ((pipeOD-pipeID)*6)"

   Else

To Enforce a Simple Minimum Length Restriction

Find the function entitled '/Draw Ends and change the code below it to reflect the noted changes below in Bold

'// Draw ends

Call at_drawEndMIns (compID, end1, point(0), port1Dir, drawMode, viewVec, "Port1")
Call at_drawEndRIns (compID, end2, point(1), port2Dir, drawMode, viewVec, "Port2")
CompLen = at_Point_distance(point(0),point(1))


If (CompLen < EP) Then
Call at_Vector_set (normVec, 0.0, 0.0, 0.0)
Call at_point_set (center,0.0,0.0,0.0)
CADObj = at_CADCircle_create(center,(pipeOD / 2), normVec)
Else 'added for N Jaworski 10/29/09
If (CompLen < 3) Then                      'added
Msgbox"Pipe must be greater than 3 Inches in length"                   'added
Else
If(showInsFlag <> 0) Then
status = at_Component_getReal (insThick, compID, "insThick")
Else
insThick = 0.0
End If
clipFlag = AT_CYLINDER_CLIPPEDGRAPHICS + AT_CYLINDER_CENTERLINEONHIDE

If (insThick > 0.001) Then
CADObj = at_CADCylinder_create (((pipeOD / 2)+insThick), point(0), point(1), AT_CYLINDER_CENTERLINEONHIDE)
status = at_Insulation_setCADPropertiesForObject(compID, Layer, CADObj)
End If
CADObj = at_CADCylinder_create ((pipeOD / 2), point(0), point(1), clipFlag)
End If

End If                             'added
End Sub

To Create a Minimum Length Rule Excluding Socket Depth and Thread Engagement

First, add the following two lines below line 104 to define the Socket Depth and Thread Engagment values:

Dim SKT_DPTH_M As Double                    'Added
Dim Thd_Eng_M As Double                        'Added

Now, again find the '/Draw Ends function and make the changes in Bold below:

'// Draw ends

Call at_drawEndMIns (compID, end1, point(0), port1Dir, drawMode, viewVec, "Port1")
Call at_drawEndRIns (compID, end2, point(1), port2Dir, drawMode, viewVec, "Port2")
CompLen = at_Point_distance(point(0),point(1))


If (CompLen < EP) Then
Call at_Vector_set (normVec, 0.0, 0.0, 0.0)
Call at_point_set (center,0.0,0.0,0.0)
CADObj = at_CADCircle_create(center,(pipeOD / 2), normVec)
Else                                                                                                        'added
If ((CompLen-Skt_Dpth_M-Thd_Eng_M) < 3) Then                   'added
Msgbox"Pipe must be greater than 3 Inches in length"           'added

Else
If(showInsFlag <> 0) Then
status = at_Component_getReal (insThick, compID, "insThick")
Else
insThick = 0.0
End If
clipFlag = AT_CYLINDER_CLIPPEDGRAPHICS + AT_CYLINDER_CENTERLINEONHIDE

If (insThick > 0.001) Then
CADObj = at_CADCylinder_create (((pipeOD / 2)+insThick), point(0), point(1), AT_CYLINDER_CENTERLINEONHIDE)
status = at_Insulation_setCADPropertiesForObject(compID, Layer, CADObj)
End If
CADObj = at_CADCylinder_create ((pipeOD / 2), point(0), point(1), clipFlag)
End If

End If                     'added
End Sub

 

**The message box content (portion in quotation marks) may be changed to reflect anything you like**

See Also

Product TechNotes and FAQs

Plant TechNotes And FAQs

External Links

Bentley Technical Support KnowledgeBase

Bentley LEARN Server

Comments or Corrections?

Bentley's Technical Support Group requests that you please confine any comments you have on this Wiki entry to this "Comments or Corrections?" section. THANK YOU!