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
messages 17to30
If you need something more please let me know
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.
' 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