Bushing

Hello,

I'm using AutoPLANT SS4 on AutoCAD 2012.

How to set parameters ​​for Bushing (COMP_LEN, THD_ENG_M, THD_ENG_R), so I would not get the break as shown in Screenshot?

Looking forward hearing from you.

Regards,

Alex Bekker

Parents Reply Children
  • Hello Alex,

    Thank you for additional information, it helped a lot.

    I have edited bushing drawing ebs file to meet current requirements. It seems that by default bushing thread engagement should be equal half of the component length (both THD_ENG_R; THD_ENG_M)

    Please open  C:\Program Files (x86)\Bentley\Plant V8i\Modules\Base\piping\draw\bushing.ebs and edit  Bushing_draw3D routine.

    Sub Bushing_draw3D (compID As At_ComponentID, portPos() As At_Point, viewVec As At_vector)

        Dim CADObj        As Long                '// Graphical CADObjects to be created
       Dim status        As Integer             '// Status code
       Dim pipeOD        As Double              '// Pipe diameter
       Dim engLen        As Double              '// Component length
       Dim port2Dir      As At_Vector           '// Port 1 direction
       Dim flag          As Integer             '// Flag to draw a centerline on hide
       Dim engageLength As Double               '// Engage Lengt added by Artiom 

       status = at_Component_getReal (pipeOD, compID, "PIPE_OD_M")
       status = at_Component_getReal (engLen, compID, "COMP_LEN")
       status = at_Component_getVector (port2Dir, compID, "Port2.Dir")  

       status = at_Component_getReal(engageLength, compID, "Port1.EL")  '// Read engageLength of Port1 added by Artiom
       '\\Call at_Point_translateByVector (portPos(1), portPos(0), port2Dir, engLen/2)
       Call at_Point_translateByVector (portPos(1), portPos(0), port2Dir, engLen-engageLength)     '// Modyfied by Artiom 

       flag = AT_CYLINDER_CENTERLINEONHIDE
       CADObj = at_CADCylinder_create(pipeOD/2, portPos(0), portPos(1), flag) 

    End Sub


    Please create a back up copy of the original file. I hope this will help. Please let me know the results. 
    Kind Regards, 
    Artiom 



    Answer Verified By: Joey 

  • This helped me a great deal.  Thanks.  

    In case some others came across this, I wanted to share a change that I made.

    I was not happy with the busing being drawn as the pipe OD.  It simply is incorrect.  In the spec there is a property called FLATS.  This is the dimension across the flats.  I wanted to draw the cylinder that diameter rather than just the pipe OD.

    Add this code under  Dim engageLength As Double: 

    Dim flatDia       As Double    '// Get Flat dim from spec

    Add this code under  status = at_Component_getVector (port2Dir, compID, "Port2.Dir"): 

    Status = AT_Component_getReal (flatDia, compID, "FLATS")

    Comment out: '//CADObj = at_CADCylinder_create(pipeOD/2, portPos(0), portPos(1), flag)

    Add this code: CADObj = at_CADCylinder_create(flatDia/2, portPos(0), portPos(1), flag) '// Read Flat dia for drawing cylinder