ROBOT API - Three and four point trapezoidal loads

ROBOT API - Three and four point trapezoidal loads

a.gonzalezY3KSY
Participant Participant
770 Views
4 Replies
Message 1 of 5

ROBOT API - Three and four point trapezoidal loads

a.gonzalezY3KSY
Participant
Participant

Hello,

 

I am Alejandro, a structural analyst of lightweight façade structures. A few weeks ago I started to use the Robot API to automate the creation of simple models.

I have problems when creating a trapezoidal load defined by more than two points (three or four). I write the code I am using:

 

Dim CaseWind As RobotSimpleCase
Set CaseWind = s.Cases.CreateSimple(3, "WIND_LOAD1", I_CN_WIND, I_CAT_STATIC_LINEAR)
Uniform = CaseWind.Records.New(I_LLT_BEAM_LOAD_TRAPEZOIDAL3)

 

Set LoadRecord = CaseWind.Records.Get(Uniform)

 

LoadRecord.SetValue I_BTRV_PX1, 0
LoadRecord.SetValue I_BTRV_PX2, 0
LoadRecord.SetValue I_BTRV_PX3, 0

LoadRecord.SetValue I_BTRV_PY1, 0
LoadRecord.SetValue I_BTRV_PY2, 1000
LoadRecord.SetValue I_BTRV_PY3, 0

LoadRecord.SetValue I_BTRV_PZ1, 0
LoadRecord.SetValue I_BTRV_PZ2, 0
LoadRecord.SetValue I_BTRV_PZ3, 0

LoadRecord.SetValue I_BTRV_X1, 0
LoadRecord.SetValue I_BTRV_X2, (longitudTrav - A)
LoadRecord.SetValue I_BTRV_X3, A

 

I have read the API documentation but have not been able to find the answer.

Thank you very much in advance.

0 Likes
Accepted solutions (1)
771 Views
4 Replies
Replies (4)
Message 2 of 5

Stephane.kapetanovic
Mentor
Mentor

hi @a.gonzalezY3KSY 

I_LLT_BEAM_LOAD_TRAPEZOIDAL3 doesn't exist in IRobotLoadRecordType

I_BTRV_PZ3 and  I_BTRV_X3 doesn't exist in IRobotBarTrapezoidaleRecordValues

Best regards

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to accept the solution and leave a < like !
EESignature
0 Likes
Message 3 of 5

Stephane.kapetanovic
Mentor
Mentor
Accepted solution

hi @a.gonzalezY3KSY 

here after sample code for a trapezoidal load with 3pts

Sub Add_New_BarTrapezoidal_3Pts()
  Dim Robapp As RobotApplication
  Dim CaseWind As RobotSimpleCase
  Dim NewRecord As RobotLoadRecordBarTrapezoidal
  Dim A As Double, B As Double

  Set Robapp = New RobotApplication
  Set CaseWind = Robapp.Project.Structure.Cases.CreateSimple(3, "WIND_LOAD1", I_CN_WIND, I_CAT_STATIC_LINEAR)
  
  A = 0.25: B = 0.5
  Set NewRecord = CaseWind.Records.Create(I_LRT_BAR_TRAPEZOIDALE)
  NewRecord.PointCount = 3
  
  With NewRecord
    .Objects.FromText "1"
    .PointCount = 3
    .SetPoint 1, 0, 0, 500, A
    .SetPoint 2, 0, 0, 1000, B
    .SetPoint 3, 0, 0, 500, 1 - A
    .SetValue I_BTRV_RELATIVE, True
  End With
  
  Robapp.Project.ViewMngr.Refresh
  Set Robapp = Nothing
End Sub

Best regards

 

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to accept the solution and leave a < like !
EESignature
0 Likes
Message 4 of 5

Stephane.kapetanovic
Mentor
Mentor

in addition

https://forums.autodesk.com/t5/robot-structural-analysis-forum/api-add-loads-to-a-bar/m-p/7855485

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to accept the solution and leave a < like !
EESignature
0 Likes
Message 5 of 5

a.gonzalezY3KSY
Participant
Participant

Thank you very much for your answers Stephane. I was used to using robot manually with the 4 point trapezoidal loading option. I had not thought of generating several individual 2-point ones.

 

I will bother you soon with more problems 😅

 

Best regards

0 Likes