Hello,
I'm trying the first simplest example in the getting started guide:
Sub Click_point() Dim Robot As New RobotApplication Robot.Project.New I_PT_FRAME_2D Robot.Project.Structure.Nodes.Create 1, 0, 0, 0 Robot.Project.Structure.Nodes.Create 2, 3, 0, 0 Robot.Project.Structure.Bars.Create 1, 1, 2 Dim Label As RobotLabel Set Label = Robot.Project.Structure.Labels.Create(I_LT_SUPPORT, "Support") Dim SupportData As RobotNodeSupportData Set SupportData = Label.Data SupportData.UX = 1 SupportData.UY = 1 SupportData.UZ = 1 SupportData.RX = 0 SupportData.RY = 0 SupportData.RZ = 0 Robot.Project.Structure.Labels.Store Label Robot.Project.Structure.Nodes.Get(1).SetLabel I_LT_SUPPORT, "Support" Robot.Project.Structure.Nodes.Get(2).SetLabel I_LT_SUPPORT, "Support" Set Label = Robot.Project.Structure.Labels.Create(I_LT_BAR_SECTION, "Beam50*50") Dim section As RobotBarSectionData Set section = Label.Data section.ShapeType = I_BSST_CONCR_BEAM_RECT Dim concrete As RobotBarSectionConcreteData Set concrete = section.concrete concrete.SetValue I_BSCDV_BEAM_B, 0.5 concrete.SetValue I_BSCDV_BEAM_H, 0.5 section.CalcNonstdGeometry Robot.Project.Structure.Labels.Store Label 'Robot.Project.Structure.Bars.Create 1, 1, 2 Robot.Project.Structure.Bars.Get(1).SetLabel I_LT_BAR_SECTION, "Beam50*50" Dim caseSW As RobotSimpleCase Set caseSW = Robot.Project.Structure.Cases.CreateSimple(1, "SW", I_CN_PERMANENT, I_CAT_STATIC_LINEAR) caseSW.Records.New I_LRT_DEAD Dim LoadRec As RobotLoadRecord Set LoadRec = caseSW.Records.Get(1) LoadRec.SetValue I_DRV_Z, -1 LoadRec.SetValue I_DRV_ENTIRE_STRUCTURE, True If Robot.Project.CalcEngine.Calculate = True Then MsgBox Robot.Project.Structure.Results.Bars.Forces.Value(1, 1, 0.5).MY End If Set Robot = Nothing End Sub
Which results in the bar created as a 'Simple bar' type. I would like to know how to create the bar as an RC beam type or how to change it after it has been created.
Thanks a lot.
Aliyu A. Aziz
Solved! Go to Solution.
Solved by Rafal.Gaweda. Go to Solution.
Examples: