Robot Structural Analysis Forum
Welcome to Autodesk’s Robot Structural Analysis Forums. Share your knowledge, ask questions, and explore popular Robot Structural Analysis topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Create steel connection via API

4 REPLIES 4
Reply
Message 1 of 5
damkow1981
631 Views, 4 Replies

Create steel connection via API

Dear Colleagues!!

 

I am trying to create steel connection via Robot API, but with no result. Please help! I have already tried "Create" method from an interface IRobotProjectComponentMngr and a "Create" method from IRJointConnection interface. I also tried to use "SetToRobot" method from IRJointConnection interface after creating connection with the methods as above. No result. This is the code I wrote:

        Dim r As IRobotApplication
        r = New RobotApplication

        Dim połączenia As IRJointConnectionServer
        połączenia = r.Project.Connections

        Dim połączenie As IRJointConnection
        połączenie = połączenia.Create(IRJointConnectionType.I_JCT_BEAM_COLUMN)

        Dim danePołączenia As RJointConnectionInfo
        danePołączenia = New RJointConnectionInfo

        danePołączenia.Name = "Połączonko"
        danePołączenia.DefType = IRJointConnectionDefType.I_JCDT_STANDALONE

        połączenie.SetToRobot(danePołączenia)

 I suspect the error lies somwhere in the variable "danePołączenia". Please find enclosed printscreen. I will be very thankful for Your support.

 

Damian Kowalski

4 REPLIES 4
Message 2 of 5
Rafal.Gaweda
in reply to: damkow1981

Kompletna procedura do tworzenia połaczenia STANDALONE  Belka-słup  na kątowniki
Wystarczy przekopiować 

Public Sub CreateWithAngles()

  Dim  RobotApp As New RobotApplication

  Dim WithAngles  As RJointBeamColumn
  Dim jointServer As RJointConnectionServer
  Set jointServer = RobotApp.Project.Connections
  Set WithAngles = jointServer.Create(I_JCT_BEAM_COLUMN)
  
  With WithAngles
    Select Case ColumnPosition
      Case TO_WEB_COLUMN
        .ElementType = I_JBCET_ANGLES_WEB
      Case TO_FLANGE_COLUMN
        .ElementType = I_JBCET_ANGLES_FLANGE
    End Select
    
  End With
  
  'PROCEDURES ------------
  JointProfiles WithAngles             //procedury zdefiniowane 
  JointWithAngles WithAngles    //procedury zdefiniowane 
  '-----------------------
  
  Dim JointInfo As RJointConnectionInfo

  Set JointInfo = jointServer.CreateInfo

JointInfo.DefType = I_JCDT_STANDALONE
JointInfo.Type = I_JCT_BEAM_COLUMN
JointInfo.Number = 0

WithAngles.SetToRobot JointInfo

Dim load As New RJointBeamGirderLoad
load.Cases.FromText ""

If NumberSides = TWO_SIDES Then
   load.LFx = 1000#
   load.LFz = 3000#
   load.LMy = 0#
End If


load.RFx = 1000#
load.RFz = 3000#
load.RMy = 0#


Ratio = jointServer.CalculateNote(NumberJoints, load, NotePath)

‘ lblRatio.Caption = CStr(Ratio)
  
 Set WithAngles = Nothing
Set load = Nothing
Set JointInfo = Nothing
Set jointServer = Nothing
End Sub


Public Sub JointWithAngles(ByRef AJoint As RJointBeamColumn)
  With AJoint
    'ELEMENTS ------------------------------
    If NumberSides = TWO_SIDES Then
      .AngleLeft.Element.Profile.Section = "LR 100x100x10"
      .AngleLeft.Element.Profile.Material = "STAL"
      .AngleLeft.Element.Length = 130#
      .AngleLeft.Element.DistFromUpperBeamEdge = 85#
      .AngleLeft.Element.ProfilePosition = I_JAPP_LONG_FLANGE_TO_COLUMN
    End If
  
    .AngleRight.Element.Profile.Section = "LR 100x100x10"
    .AngleRight.Element.Profile.Material = "STAL"
    .AngleRight.Element.Length = 130#
    .AngleRight.Element.DistFromUpperBeamEdge = 85#
    .AngleRight.Element.ProfilePosition = I_JAPP_LONG_FLANGE_TO_COLUMN
    '---------------------------------------
  
    '-----------BOLTS -----------------------------------
    If NumberSides = TWO_SIDES Then
      .AngleLeft.BoltsMain.ClassName = BeamcolumnMainForm.cboBoltsClass.Text
      .AngleLeft.BoltsMain.DiameterName = BeamcolumnMainForm.cboBoltsDiameter.Text
      .AngleLeft.BoltsMain.Rows = 2
      .AngleLeft.BoltsMain.Cols = 2
      .AngleLeft.BoltsMain.SpacingV = 60#
      .AngleLeft.BoltsMain.SpacingH = 60#
      .AngleLeft.BoltsMain.Friction = 0.3
      .AngleLeft.BoltsMain.DistFromUpperElementEdge = 35#
      .AngleLeft.BoltsMain.DistFromVertElementEdge = 65#

      .AngleLeft.BoltsBeam.ClassName = BeamcolumnMainForm.cboBoltsClass.Text
      .AngleLeft.BoltsBeam.DiameterName = BeamcolumnMainForm.cboBoltsDiameter.Text
      .AngleLeft.BoltsBeam.Rows = Rows
      .AngleLeft.BoltsBeam.Cols = Cols
      .AngleLeft.BoltsBeam.SpacingH = 60#
      .AngleLeft.BoltsBeam.SpacingV = 60#
      .AngleLeft.BoltsBeam.Friction = 0.3
      .AngleLeft.BoltsBeam.DistFromUpperBeamEdge = 35#
      .AngleLeft.BoltsBeam.DistFromVertBeamEdge = 65#
    End If
  
    .AngleRight.BoltsMain.ClassName = BeamcolumnMainForm.cboBoltsClass.Text
    .AngleRight.BoltsMain.DiameterName = BeamcolumnMainForm.cboBoltsDiameter.Text
    .AngleRight.BoltsMain.Rows = 2
    .AngleRight.BoltsMain.Cols = 1
    .AngleRight.BoltsMain.SpacingV = 60#
    .AngleRight.BoltsMain.SpacingH = 60#
    .AngleRight.BoltsMain.Friction = 0.3
    .AngleRight.BoltsMain.DistFromUpperElementEdge = 35#
    .AngleRight.BoltsMain.DistFromVertElementEdge = 65#

    .AngleRight.BoltsBeam.ClassName = BeamcolumnMainForm.cboBoltsClass.Text
    .AngleRight.BoltsBeam.DiameterName = BeamcolumnMainForm.cboBoltsDiameter.Text
    .AngleRight.BoltsBeam.Rows = Rows
    .AngleRight.BoltsBeam.Cols = Cols
    .AngleRight.BoltsBeam.SpacingV = 60#
    .AngleRight.BoltsBeam.SpacingH = 60#
    .AngleRight.BoltsBeam.Friction = 0.3
   
    .AngleRight.BoltsBeam.DistFromUpperBeamEdge = 35#
    .AngleRight.BoltsBeam.DistFromVertBeamEdge = 65
    '-----------------------------------
  End With
End Sub


Public Sub JointProfiles(ByRef AJoint As RJointBeamColumn)
  With AJoint
      'COLUMN -----------------------
    .Column.Section = BeamcolumnMainForm.cboColumnProfile.Text
    .Column.Material = BeamcolumnMainForm.cboColumnMaterial.Text
    '------------------------------------
  
    '--- BEAM_LEFT ----------------------
    If NumberSides = TWO_SIDES Then
      .BeamLeftExist = True
      .BeamLeft.Section = BeamcolumnMainForm.cboBeamLeftProfile.Text
      .BeamLeft.Material = BeamcolumnMainForm.cboBeamLeftMaterial.Text
    End If
  
    '---- BEAM_RIGHT -----------------
    .BeamRight.Section = BeamcolumnMainForm.cboBeamRightProfile.Text
    .BeamRight.Material = BeamcolumnMainForm.cboBeamRightMaterial.Text
    '---------------------------
     
    If NumberSides = TWO_SIDES Then
      .DistColumnToBeamLeft = 15#
    End If
    
    .DistColumnToBeamRight = 15#
  End With
End Sub

 



Rafal Gaweda
Message 3 of 5
damkow1981
in reply to: Rafal.Gaweda

Jak zwykle szybko i konkretnie 🙂
Dziękuję i pozdrawiam!
Message 4 of 5
damkow1981
in reply to: damkow1981

Could You please send such a piece of code for a connection defined on structure elements? Thank You in advance!!

Message 5 of 5
jmmarin
in reply to: Rafal.Gaweda

Dear @Rafal.Gaweda,

 

following this old post...

 

Could you explain the first part of the code to define a base plate connection in VBA?. It is being so hard for me to define the first lines of the code. I have the following, but I have not knowledge enough to continue:

 

 

Sub placa()

  Dim RobotApp As New RobotApplication
  Set RobotApp = New RobotApplication
  
  Dim prj As IRobotProject
  Set prj = RobotApp.Project
  
  prj.New I_PT_STEEL_CONNECTION
  
  Dim unionServer As IRJointConnectionServer
  Set unionServer = RobotApp.Project.Connections
  
End sub

Thank you in advance. 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report