Document Type: TechNote Product(s): AutoPLANT Piping Version(s): All Original Author: Jesse Wolfe; Bentley Technical Support Group
Document Type: TechNote
Product(s): AutoPLANT Piping
Version(s): All
Original Author: Jesse Wolfe; Bentley Technical Support Group
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).
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
(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
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:
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
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) ThenCall 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/09If (CompLen < 3) Then 'addedMsgbox"Pipe must be greater than 3 Inches in length" 'addedElseIf(showInsFlag <> 0) Thenstatus = at_Component_getReal (insThick, compID, "insThick")ElseinsThick = 0.0End IfclipFlag = AT_CYLINDER_CLIPPEDGRAPHICS + AT_CYLINDER_CENTERLINEONHIDE
If (insThick > 0.001) ThenCADObj = at_CADCylinder_create (((pipeOD / 2)+insThick), point(0), point(1), AT_CYLINDER_CENTERLINEONHIDE)status = at_Insulation_setCADPropertiesForObject(compID, Layer, CADObj)End IfCADObj = at_CADCylinder_create ((pipeOD / 2), point(0), point(1), clipFlag)End If
End If 'addedEnd Sub
First, add the following two lines below line 104 to define the Socket Depth and Thread Engagment values:
Dim SKT_DPTH_M As Double 'AddedDim Thd_Eng_M As Double 'Added
Now, again find the '/Draw Ends function and make the changes in Bold below:
If (CompLen < EP) ThenCall 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 'addedIf ((CompLen-Skt_Dpth_M-Thd_Eng_M) < 3) Then 'addedMsgbox"Pipe must be greater than 3 Inches in length" 'added
ElseIf(showInsFlag <> 0) Thenstatus = at_Component_getReal (insThick, compID, "insThick")ElseinsThick = 0.0End IfclipFlag = AT_CYLINDER_CLIPPEDGRAPHICS + AT_CYLINDER_CENTERLINEONHIDE
**The message box content (portion in quotation marks) may be changed to reflect anything you like**
Product TechNotes and FAQs
Plant TechNotes And FAQs
Bentley Technical Support KnowledgeBase
Bentley LEARN Server
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!