View Full Version : TEE Strainers
Packin31
07-28-2006, 07:17 AM
I am pulling my hair out on this one. I have put a tee type strainer in the spec with FL for all end conditions. When the user places the strainer in the model only two flanges are being place, one on the horizontal run and the other on the branch side. What am I Missing?
Thanks
wuzhongbo
07-30-2006, 06:13 PM
Hello, Tom. Did you add a value in FLNG_OD_B and FLNG_TH_B?
If you want to add a component with FL EndCode, you must defines it's parameters like FLNG_OD_M, FLNG_OD_B, FLNG_TH_M, FLNG_TH_B, End_COND_1, End_COND_2, End_COND_3, RATING, etc.
Try it, and tell me how it goes. 8)
Packin31
07-31-2006, 05:40 AM
wuzhongbo,
Did you add a value in FLNG_OD_B and FLNG_TH_B?
Did that this morning and it still not putting in the third flange. When I view componet details it only shows two Ports. One on main run the other on the branch run. Maybe I need to add another port? If so where, how?
Thanks
wuzhongbo
08-01-2006, 04:13 AM
Hi, Tom!
First, set the value of END_COND_1, END_COND_2, END_COND_3 as 'FL';
Second, set the value of FLNG_OD_M, FLNG_OD_B, FLNG_TH_M, FLNG_TH_B.
Have a try! 8)
Packin31
08-02-2006, 03:51 AM
wuzhongbo,
Did all that and still no luck. :? For now the user is just going to place a basket strainer until I can figure it out or I will open a SR ticket with Bentley once their service is back up and running.
Thanks for you help
Colby
08-02-2006, 04:17 AM
wuzhongbo,
Did all that and still no luck. :? For now the user is just going to place a basket strainer until I can figure it out or I will open a SR ticket with Bentley once their service is back up and running.
Thanks for you help
Could you post the cmponent data from the class editor?
Packin31
08-02-2006, 04:34 AM
Cobly,
Sorry for my ignorance but I know little about class editor. How do I get the component data out of it?
Colby
08-02-2006, 09:38 AM
Cobly,
Sorry for my ignorance but I know little about class editor. How do I get the component data out of it?
When you open Calss Editor Take a Screen Shot or copy the lines into a text file then past it here For this component. I believe you have the right set up, but you always have to check to see how the Class Editor is mapping the properties of this object.
Colby
08-02-2006, 09:39 AM
Cobly,
Sorry for my ignorance but I know little about class editor. How do I get the component data out of it?
When you open Calss Editor Take a Screen Shot or copy the lines into a text file then past it here For this component. I believe you have the right set up, but you always have to check to see how the Class Editor is mapping the properties of this object.
Colby
08-02-2006, 09:40 AM
Cobly,
Sorry for my ignorance but I know little about class editor. How do I get the component data out of it?
When you open Calss Editor Take a Screen Shot or copy the lines into a text file then past it here For this component. I believe you have the right set up, but you always have to check to see how the Class Editor is mapping the properties of this object.
Or you can post the properties of this component that are in the "CLASS.ini" file.
Packin31
08-02-2006, 10:18 AM
;//
;// Tee strainer
;//
[AT_TEESTRAIN]
PARENT_CLASS=BASE_BRANCHES_CLASS
PORT_KEY=TeeStrainPorts
METHOD_KEY=AT_TEESTRAIN
SPEC_KEY=TEESTRAIN
PICT_NAME=TEE_STRAIN
BRANCH_ANGLE=90.0
RUN_ANGLE=0.0
CLASS_DESCRIPTION=Base Tee Strainer
SPEC_GROUP=FITTING
ISOLENGTH_KEY=AT_TEE
Colby
08-02-2006, 11:25 AM
;//
;// Tee strainer
;//
[AT_TEESTRAIN]
PARENT_CLASS=BASE_BRANCHES_CLASS
PORT_KEY=TeeStrainPorts
METHOD_KEY=AT_TEESTRAIN
SPEC_KEY=TEESTRAIN
PICT_NAME=TEE_STRAIN
BRANCH_ANGLE=90.0
RUN_ANGLE=0.0
CLASS_DESCRIPTION=Base Tee Strainer
SPEC_GROUP=FITTING
ISOLENGTH_KEY=AT_TEE
This looks good can you post the "Draw Method"
Packin31
08-02-2006, 11:29 AM
Colby,
Did you take a classs on this or did you learn it on your own?
'/////////////////////////////////////////////////////////////////////////
'//
'// Tee Draw Routines
'//
'/////////////////////////////////////////////////////////////////////////
Sub at_teestrain_draw ()
Dim drawMode As String '// Current drawing mode
Dim viewDir As String '// View direction
Dim status As Integer '// status code
Dim compID As At_ComponentID '// Component ID
Dim viewVec As At_Vector '// View vector
Dim portPos(0 To 2) As At_Point '// Location of the ports
'// Get parameters from specs and preferences
status = at_Component_getCurrID (compID)
status = at_Preference_getString (drawMode, "Draw_Mode")
Call at_Vector_set(viewVec, 0.0, 0.0, 1.0)
status = at_Component_getViewDir (viewDir, compID, viewVec)
status = at_CADCurrObjectSet_begin()
status = at_Component_getPoint (portPos(0), compID, "Port1.Loc")
status = at_Component_getPoint (portPos(1), compID, "Port2.Loc")
'// Select the subroutine for the current drawing mode and direction
Select Case UCase(drawMode)
Case "3D", "DOUBLE"
Call tee_draw3D (compID, viewVec, portPos(), drawMode)
Case "SINGLE"
Call tee_draw3D (compID, viewVec, portPos(), drawMode)
End Select
status = at_CADCurrObjectSet_addToDrawing()
Call at_CADCurrObjectSet_end()
End Sub
'///////////////////////////////////////////////////////////////////////////////
'//
'// 3D Tees
'//
'////////////////////////////////////////////////////////////////////////////////
Sub tee_draw3D(compID As At_ComponentID, viewVec As At_Vector, portPos() As At_Point, drawMode As String)
Dim CADObj As Long '// Graphical CADObjects to be created
Dim cP As At_Point '// Center point location
Dim endPt As At_Point '// End point for run
Dim endBack As At_Point '// Point to copy end point
Dim endBack1 As At_Point '// Point to copy end point
Dim port1OD As Double '// Diameter of port1
Dim port2OD As Double '// Diameter of port2
Dim status As Integer '// status code
Dim end1 As String '// End condition of port1
Dim end2 As String '// End condition of port2
Dim port1Dir As At_Vector '// Direction for port1
Dim port2Dir As At_Vector '// Direction for port2
Dim endPtDir As At_Vector '// Direction for end point
Dim axisVec As At_Vector '// Vector to draw a hemisphere
Dim cFlag As Integer '// Flag to draw a centerline on hide
Dim ctrEndM As Double '// Diameter of port2
'// Get parameters from specs and preferences
status = at_Component_getPoint (cP, compID, "CP.Loc")
status = at_Component_getPoint (endPt, compID, "EndPt.Loc")
status = at_Component_getReal (port1OD, compID, "PIPE_OD_M")
status = at_Component_getReal (port2OD, compID, "Pipe_OD_B")
status = at_Component_getReal (ctrEndM, compID, "CTR_END_M")
status = at_Component_getVector (port1Dir, compID, "Port1.Dir")
status = at_Component_getVector (port2Dir, compID, "Port2.Dir")
status = at_Component_getString (end1, compID, "Port1.EC")
status = at_Component_getString (end2, compID, "Port2.EC")
Call at_Point_copy (endBack, endPt)
'// Draw End symbols
Call at_DrawEnd_main (compID, end1, portPos(0), port1Dir, drawMode, viewVec, "Port1")
Call at_DrawEnd_main (compID, end1, portPos(1), port2Dir, drawMode, viewVec, "Port1")
'// If bran diameter is zero then this is a stright Tee
If (port2OD = 0.0) Then
port2OD = port1OD
End If
cFlag = AT_CYLINDER_CENTERLINEONHIDE
'// Draw a component
CADObj = at_CADCylinder_create (port1OD/2, cP, portPos(1), cFlag)
cFlag = AT_CYLINDER_CENTERLINEONHIDE + AT_CYLINDER_END_RIM
Call at_point_translateByVector (endback1, cP, port1Dir, -ctrEndM)
CADObj = at_CADCylinder_create (port1OD/2, portPos(0), endback1, cFlag)
End Sub
Colby
08-02-2006, 11:44 AM
Ok that is the drawing script The Draw method I am refereing to is in the Calss editor. Let me know what that says In the meantime I will take a look at your script
Packin31
08-02-2006, 11:54 AM
My bad
Is this it :?:
DRAW_METHOD at_teestrain_draw %APP_DIR%\Draw\teeStrain
Colby
08-02-2006, 12:20 PM
that is correct I am making sure that all the perameters are correct.
Colby
08-02-2006, 12:24 PM
Colby,
Did you take a classs on this or did you learn it on your own?
'/////////////////////////////////////////////////////////////////////////
'//
'// Tee Draw Routines
'//
'/////////////////////////////////////////////////////////////////////////
Sub at_teestrain_draw ()
Dim drawMode As String '// Current drawing mode
Dim viewDir As String '// View direction
Dim status As Integer '// status code
Dim compID As At_ComponentID '// Component ID
Dim viewVec As At_Vector '// View vector
Dim portPos(0 To 2) As At_Point '// Location of the ports
'// Get parameters from specs and preferences
status = at_Component_getCurrID (compID)
status = at_Preference_getString (drawMode, "Draw_Mode")
Call at_Vector_set(viewVec, 0.0, 0.0, 1.0)
status = at_Component_getViewDir (viewDir, compID, viewVec)
status = at_CADCurrObjectSet_begin()
status = at_Component_getPoint (portPos(0), compID, "Port1.Loc")
status = at_Component_getPoint (portPos(1), compID, "Port2.Loc")
'// Select the subroutine for the current drawing mode and direction
Select Case UCase(drawMode)
Case "3D", "DOUBLE"
Call tee_draw3D (compID, viewVec, portPos(), drawMode)
Case "SINGLE"
Call tee_draw3D (compID, viewVec, portPos(), drawMode)
End Select
status = at_CADCurrObjectSet_addToDrawing()
Call at_CADCurrObjectSet_end()
End Sub
'///////////////////////////////////////////////////////////////////////////////
'//
'// 3D Tees
'//
'////////////////////////////////////////////////////////////////////////////////
Sub tee_draw3D(compID As At_ComponentID, viewVec As At_Vector, portPos() As At_Point, drawMode As String)
Dim CADObj As Long '// Graphical CADObjects to be created
Dim cP As At_Point '// Center point location
Dim endPt As At_Point '// End point for run
Dim endBack As At_Point '// Point to copy end point
Dim endBack1 As At_Point '// Point to copy end point
Dim port1OD As Double '// Diameter of port1
Dim port2OD As Double '// Diameter of port2
Dim status As Integer '// status code
Dim end1 As String '// End condition of port1
Dim end2 As String '// End condition of port2
Dim port1Dir As At_Vector '// Direction for port1
Dim port2Dir As At_Vector '// Direction for port2
Dim endPtDir As At_Vector '// Direction for end point
Dim axisVec As At_Vector '// Vector to draw a hemisphere
Dim cFlag As Integer '// Flag to draw a centerline on hide
Dim ctrEndM As Double '// Diameter of port2
'// Get parameters from specs and preferences
status = at_Component_getPoint (cP, compID, "CP.Loc")
status = at_Component_getPoint (endPt, compID, "EndPt.Loc")
status = at_Component_getReal (port1OD, compID, "PIPE_OD_M")
status = at_Component_getReal (port2OD, compID, "Pipe_OD_B")
status = at_Component_getReal (ctrEndM, compID, "CTR_END_M")
status = at_Component_getVector (port1Dir, compID, "Port1.Dir")
status = at_Component_getVector (port2Dir, compID, "Port2.Dir")
status = at_Component_getString (end1, compID, "Port1.EC")
status = at_Component_getString (end2, compID, "Port2.EC")
Call at_Point_copy (endBack, endPt)
'// Draw End symbols
Call at_DrawEnd_main (compID, end1, portPos(0), port1Dir, drawMode, viewVec, "Port1")
Call at_DrawEnd_main (compID, end1, portPos(1), port2Dir, drawMode, viewVec, "Port1")
'// If bran diameter is zero then this is a stright Tee
If (port2OD = 0.0) Then
port2OD = port1OD
End If
cFlag = AT_CYLINDER_CENTERLINEONHIDE
'// Draw a component
CADObj = at_CADCylinder_create (port1OD/2, cP, portPos(1), cFlag)
cFlag = AT_CYLINDER_CENTERLINEONHIDE + AT_CYLINDER_END_RIM
Call at_point_translateByVector (endback1, cP, port1Dir, -ctrEndM)
CADObj = at_CADCylinder_create (port1OD/2, portPos(0), endback1, cFlag)
End Sub
The reason you are only getting two flanges instead of three is in the script file. If you look close you can see you only have two Port Connections. A main and a branch. When I get a chance I will modify the Script to draw the flanges on all connections if applicable.
Packin31
08-02-2006, 12:42 PM
This is straight out of box routine. Wonder why they don't have a third port to begin with :?:
Looks like I need to take some classes on this :idea:
wuzhongbo
08-02-2006, 05:36 PM
Sorry for my mistake, I have opened Piping help, I found that the Tee Strainer has two enabled ports only, the third port closed. So, I think we should define a new Tee Strainer with three enalbed ports.
Packin31
08-21-2006, 12:51 PM
Testing tee or new forum layout?
Yeah for a short time the links the 2nd pages and beyond were broken. All cleared up now.
Colby
08-24-2006, 06:15 PM
I have not forgot about this I am looking into this right now
Packin31
08-28-2006, 03:52 AM
Colby,
Thanks.
Need to get use to this new forum layout.
Colby
09-04-2006, 03:02 PM
here s a sample of how to get the flange on the other side of the tee
This is just a sample not a fix I will post two seperate fixes later.
'///////////////////////////////////////////////////////////////////////////////
'//
'// 3D Tees
'//
'////////////////////////////////////////////////////////////////////////////////
Sub tee_draw3D(compID As At_ComponentID, viewVec As At_Vector, portPos() As At_Point, drawMode As String)
Dim CADObj As Long '// Graphical CADObjects to be created
Dim cP As At_Point '// Center point location
Dim endPt As At_Point '// End point for run
Dim endBack As At_Point '// Point to copy end point
Dim endBack1 As At_Point '// Point to copy end point
Dim port1OD As Double '// Diameter of port1
Dim port2OD As Double '// Diameter of port2
Dim port3OD As Double '// Diameter of port3
Dim status As Integer '// status code
Dim end1 As String '// End condition of port1
Dim end2 As String '// End condition of port2
Dim end3 As String '// End condition of port3
Dim port1Dir As At_Vector '// Direction for port1
Dim port2Dir As At_Vector '// Direction for port2
Dim port3Dir As At_Vector '// Direction for port3
Dim endPtDir As At_Vector '// Direction for end point
Dim axisVec As At_Vector '// Vector to draw a hemisphere
Dim cFlag As Integer '// Flag to draw a centerline on hide
Dim ctrEndM As Double '// Diameter of port2
Dim C_len As Double
'// Get parameters from specs and preferences
status = at_Component_getPoint (cP, compID, "CP.Loc")
status = at_Component_getPoint (endPt, compID, "EndPt.Loc")
status = at_Component_getReal (port1OD, compID, "PIPE_OD_M")
status = at_Component_getReal (port3OD, compID, "PIPE_OD_M")
status = at_Component_getReal (port2OD, compID, "Pipe_OD_B")
status = at_Component_getReal (ctrEndM, compID, "CTR_END_M")
status = at_Component_getVector (port1Dir, compID, "Port1.Dir")
status = at_Component_getVector (port2Dir, compID, "Port2.Dir")
c_len = (2.00 * ctrEndM) * -1.00
Call at_Point_translateByVector (endback1, endPt, Port1Dir, c_len)
status = at_Component_getString (end1, compID, "Port1.EC")
status = at_Component_getString (end2, compID, "Port2.EC")
Call at_Point_copy (endBack, endPt)
'// Draw End symbols
Call at_DrawEnd_main (compID, end1, portPos(0), port1Dir, drawMode, viewVec, "Port1")
Call at_DrawEnd_main (compID, end2, portPos(1), port2Dir, drawMode, viewVec, "Port2")
Call at_DrawEnd_main (compID, end1, endBack1, port1Dir, drawmode, viewVec, "Port3")
'// If bran diameter is zero then this is a stright Tee
If (port2OD = 0.0) Then
port2OD = port1OD
End If
cFlag = AT_CYLINDER_CENTERLINEONHIDE
'// Draw a component
CADObj = at_CADCylinder_create (port1OD/2, cP, portPos(1), cFlag)
cFlag = AT_CYLINDER_CENTERLINEONHIDE + AT_CYLINDER_END_RIM
Call at_point_translateByVector (endback1, cP, port1Dir, -ctrEndM)
CADObj = at_CADCylinder_create (port1OD/2, portPos(0), endback1, cFlag)
End Sub
AplantAdmin
09-08-2006, 06:05 AM
Colby
Any luck getting this two work??
Colby
09-11-2006, 09:55 AM
I am still lookig at it. It basically boils down to creating a new port in the Class Manager and making sure that is mapped out correctly then just tuning up the code. I will try to look at it some time this week.
Packin31
09-15-2006, 08:54 AM
Cobly,
Sorry for not responding sooner. Dave’s homepage doesn't work so my brain finally said why don't you do a search in Yahoo and IT found the forums address.
Thanks for still looking into this for me/us. We really appreciate it.
Colby
09-21-2006, 05:20 PM
Packin31,
I am truly sorry about the slack in getting this issue resolved!
I think I have a cheesy fix But I can not test it out In the Class Editor Change the Draw Method to the Same Draw Method as the Reducing Tee and See if that Works.
:-)
Packin31
09-22-2006, 04:45 AM
I am just kidding Colby.
I understand we are all busy right now and infrastructure stuff has to be put on the back burner. We are so busy I can't get to some things myself.
Take care
AplantAdmin
09-26-2006, 07:54 AM
Ok here is what we did to get the tee strainer to work. This is only a work around fix.
In the project config directory, we added the following folders.
driveletter:\autoplant\project\client\config\modul es\base\common
and in the base folder we copied the following files.
class.ini (with the following info)
[AT_TEESTRAIN]
BRANCH_ANGLE = 90.0
CLASS_DESCRIPTION = Base Tee Strainer
ISOLENGTH_KEY = AT_TEE
METHOD_KEY = BASE_BRANCHES_METHOD
PARENT_CLASS = BASE_BRANCHES_CLASS
PICT_NAME = TEE_STRAIN
PORT_KEY = TeePorts
RUN_ANGLE = 0.0
SPEC_GROUP = FITTING
SPEC_KEY = TEESTRAIN
BRANCH_CODE = T
and ports.ini (with the following info)
;;Port_Names = Port1; Port2
;;Point_Names = CP
;;Def_Ins_Port = Port1
;;Def_Ref_Point = Port1
;;Traversal = Port1, CP, xDir, World_XDir; CP, Port2, yDir, World_YDir
;;Dim_Nodes = CP
;;Dir_Changes = CP.
now this will put the tee strainer in your drawing, but you must have the same end condition on all 3 ports. If you put a flanged connection on the branch, and use BW on the other 2 ports, the tee strainer will still fail. So we add a weldneck flange to the branch side and turn it to existing. Then you can add a blind flange to that and make it existing.
This will give you the all the info needed in your BOM.
Packin31
09-28-2006, 11:07 AM
Steve,
Still can't seem to get third port to work?
See attached drawings
Packin31
10-03-2006, 05:12 AM
Steve,
I moved the class.ini and ports.ini up one folder "driveletter:\autoplant\project\client\config\modul es\base\" and it put the strainer in with flanges on all the ports.
Thankyou very much for the fix.
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.