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: 
Reply
Message 1 of 6
samuel.pereira
404 Views, 5 Replies

Moving loads API

Hello,

 

I'm trying to create a moving load and vehicle to assign to a bar using Robot steel API.

It’s possible provide a complete example to "Visual Basic -Microsoft Excel" for a type?

 

Thanks

5 REPLIES 5
Message 2 of 6

http://forums.autodesk.com/t5/Autodesk-Robot-Structural/VBA-loads-API/td-p/3232602/highlight/true/pa...

 

messages 17to30

 

If you need something more please let me know



Rafal Gaweda
Message 3 of 6

Thank you.

Message 4 of 6

Hello,

 

Before creating new vehicle, want to delete all existing vehicles. How do this?

 

Right now my code is:

 

Public Sub Veiculo()

Dim RobApp As New RobotApplication
Set RobApp = New RobotApplication

Dim VLabel As RobotLabel
Dim VData As RobotVehicleData
Dim VLoad As RobotVehicleLoad

Set VLabel = RobApp.Project.Structure.Labels.Create(I_LT_VEHICLE, "PONTE")
Set VData = VLabel.Data
For J = 1 To 8
Set VLoad = VData.Loads.New
VLoad.Type = I_VLT_CONCENTRATED
VLoad.F = (Cells(18 + J, 4) * 1000)
VLoad.X = Cells(18 + J, 3)
VLoad.S = 0
Next

RobApp.Project.Structure.Labels.Store VLabel

End Sub

 

Thank you.

 

 

Message 5 of 6

' To delete only vehicles used in the structure

 

Dim exisitng_vehicles As IRobotCollection

Set existing_vehicles = RobApp.Project.Structure.Labels.GetMany(I_LT_VEHICLE)

For idx = 1 To existing_vehicles.Count

    RobApp.Project.Structure.Labels.Delete I_LT_VEHICLE, existing_vehicles.Get(idx).Name

Next

 

' To delete all available vehicles

 

Dim available_vehicles As IRobotNamesArray

Set available_vehicles = RobApp.Project.Structure.Labels.GetAvailableNames(I_LT_VEHICLE)

For idx = 1 To available_vehicles.Count

    RobApp.Project.Structure.Labels.Delete I_LT_VEHICLE, available_vehicles.Get(idx)

Next



Artur Kosakowski
Message 6 of 6

Thank you!

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

Post to forums  

Autodesk Design & Make Report