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: 

Robot member type definition by API

1 REPLY 1
SOLVED
Reply
Message 1 of 2
aliyuaziz
1509 Views, 1 Reply

Robot member type definition by API

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

1 REPLY 1

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

Post to forums  

Autodesk Design & Make Report