Autodesk Robot Structural Analysis
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Re: VBA loads
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
mateaus wrote:
I have created a convoy which name is "TS".
If I understand your macro, I just have to replace "PN1030" by "TS" :
VData.LoadFromDBase "Pojazd S - klasa E", "TS"
I have created a catalog to save my convoy. I don't know how to save it otherwise.
Will it working with your macro ?
' assign vehicle to case
Set VLabel = Robapp.Project.Structure.Labels.Create(I_LT_VEHICL
E, "your_vehicle_name") ' select vehicle name
Set VData = VLabel.Data
VData.LoadFromDBase "your_vehicle_name", "PRO" ' PRO is the name of your database
Robapp.Project.Structure.Labels.Store VLabel
Cas.Vehicle = "your_vehicle_name"

Rafal Gaweda
Product Support
Autodesk, Inc.
Re: VBA loads
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I would like to create a convoy's library in order to share it whith my colleagues but I don't know where it is save in the computer and what I have to copy in their computer.
The database file is created in:
"c:\Users\<USER>\AppData\Roaming\Autodesk\Structur
as V_...xml file. In your case V_PRO.xml file
copy it to similar location on other computers.

Rafal Gaweda
Product Support
Autodesk, Inc.
Re: VBA loads
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
RG_Adsk wrote:I would like to create a convoy's library in order to share it whith my colleagues but I don't know where it is save in the computer and what I have to copy in their computer.
The database file is created in:
"c:\Users\<USER>\AppData\Roaming\Autodesk\Structur
al\Common Data\2012"
as V_...xml file. In your case V_PRO.xml file
copy it to similar location on other computers.
It doesn't work. I have copied the file but there is nothing when I open Robot :
Re: VBA loads
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Add this database to project:

Rafal Gaweda
Product Support
Autodesk, Inc.
Re: VBA loads
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Ok is it possible to do it automaticaly. Is there a file default to copy ?
Re: VBA loads
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Ok is it possible to do it automaticaly. Is there a file default to copy ?
So you already know where the database file is located.
Add database to job preferences as shown in previous post, then save preferences:
File named ...cov will be saved in path which can be checked in the field marked by green rectagle below
Then copy it to different computers to similar folder, besides copying database file.

Rafal Gaweda
Product Support
Autodesk, Inc.
Re: VBA loads
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
RG_Adsk wrote:
Creating moving load case with vehicle loaded from database:
Dim Cas As RobotMobileCase
Dim Route As RobotMobileCaseRoute
Dim VData As RobotVehicleData
' route is a polyline - creating polyline here
Dim PlineGeometry As RobotGeoPolyline
Set PlineGeometry = Robapp.CmpntFactory.Create(I_CT_GEO_POLYLINE)
Dim Segment As RobotGeoSegment
Dim Object As RobotObjObject
' create as many segments (= characteristic points of polyline) as you like in the way shown below
Set Segment = Robapp.CmpntFactory.Create(I_CT_GEO_SEGMENT_LINE)
Segment.P1.Set 0, 2, 0PlineGeometry.Add Segment
PlineGeometry.Initialize
Set Segment = Robapp.CmpntFactory.Create(I_CT_GEO_SEGMENT_LINE)
Segment.P1.Set 10, 2, 0PlineGeometry.Add Segment
PlineGeometry.Initialize
RouteNumber = 13
' creating object from polyline
Set Object = Robapp.Project.Structure.Objects.Create(RouteNumbe
r)
Object.Main.Geometry = PlineGeometry
Object.Initialize
Object.Update
' creating moving load case
Set Cas = Robapp.Project.Structure.Cases.CreateMobile(Robapp
.Project.Structure.Cases.FreeNumber, "Moving Load Case", I_CN_PERMANENT)
' assigning route and route parameters to case
Set Route = Cas.GetRouteRoute.Geometry = RouteNumber
Dim Fac As RobotMobileCaseSegmentFactors
Set Fac = Route.GetFactors(1)
Fac.VL = 1
Fac.VR = 1
Route.SetFactors 1, Fac
Route.LoadDirection.Set 0, 0, -1
Route.Step = 1
Cas.SetRoute Route
' assign vehicle to case
Set VLabel = Robapp.Project.Structure.Labels.Create(I_LT_VEHICL
E, "Pojazd S - klasa E") ' select vehicle name
Set VData = VLabel.Data
VData.LoadFromDBase "Pojazd S - klasa E", "PN1030" ' select vehicle name and database name
Robapp.Project.Structure.Labels.Store VLabel
Cas.Vehicle = "Pojazd S - klasa E" ' assign vehicle to case
I've modified the macro but it's not working if I want to select a case which already exist :
'définit les cas de charges Dim Loads As RobotCaseServer Set Loads = Robapp.Project.Structure.Cases Dim Cas As RobotMobileCase
Set Cas = Loads.Get(nocasdecharge)
Sub generation_charges_roulantes() 'définit les cas de charges Dim Loads As RobotCaseServer Set Loads = Robapp.Project.Structure.Cases Dim Cas As RobotMobileCase Dim Route As RobotMobileCaseRoute Dim VData As RobotVehicleData ' route is a polyline - creating polyline here Dim PlineGeometry As RobotGeoPolyline Set PlineGeometry = Robapp.CmpntFactory.Create(I_CT_GEO_POLYLINE) Dim Segment As RobotGeoSegment Dim Object As RobotObjObject ' create as many segments (= characteristic points of polyline) as you like in the way shown below Set Segment = Robapp.CmpntFactory.Create(I_CT_GEO_SEGMENT_LINE) Segment.P1.Set x_1, y_1, z_1 PlineGeometry.Add Segment PlineGeometry.Initialize Set Segment = Robapp.CmpntFactory.Create(I_CT_GEO_SEGMENT_LINE) Segment.P1.Set x_2, y_2, z_2 PlineGeometry.Add Segment PlineGeometry.Initialize ' creating object from polyline Set Object = Robapp.Project.Structure.Objects.Create(RouteNumber) Object.Main.Geometry = PlineGeometry Object.Initialize Object.Update ' creating moving load case Set Cas = Loads.Get(nocasdecharge) 'Set Cas = Robapp.Project.Structure.Cases.CreateMobile(Robapp .Project.Structure.Cases.FreeNumber, "Moving Load Case", I_CN_PERMANENT) ' assigning route and route parameters to case Set Route = Cas.GetRoute Route.Geometry = RouteNumber Route.LoadDirection.Set 0, 0, -1 'définit le pas (non paramétré) Route.Step = 1 Cas.SetRoute Route ' assign vehicle to case Set VLabel = Robapp.Project.Structure.Labels.Create(I_LT_VEHICL E, Vehicle_name) ' select vehicle name Set VData = VLabel.Data 'Pour charger un vehicule enregistrer dans la bibliothèque (cmd non utilisé) 'VData.LoadFromDBase Vehicle_name, "PRO" ' PRO is the name of your database ; select vehicle name and database name Robapp.Project.Structure.Labels.Store VLabel Cas.Vehicle = Vehicle_name ' assign vehicle to case End Sub
Re: VBA loads
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
MateausI've modified the macro but it's not working if I want to select a case which already exist :
It is not possible. Moving load case is different case type, even if you make it manually in Robot you do it in different way. Do it this way:
- get simple case number
- delete this simple case
- create moving load case with this number

Rafal Gaweda
Product Support
Autodesk, Inc.
Re: VBA loads
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
When I generate the moving loads with API even if I load from data or create a new one I can't see the value of loads in the view.
Is there a solution ?
Re: VBA loads
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
mateaus wrote:
When I generate the moving loads with API even if I load from data or create a new one I can't see the value of loads in the view.
Add this green code. If loads are not displayed please run Model Generation or Calculations
' assigning route and route parameters to case Set Route = Cas.GetRoute Route.Geometry = RouteNumber
Dim Fac As RobotMobileCaseSegmentFactors
Set Fac = Route.GetFactors(1)
Fac.VL = 1
Fac.VR = 1
Route.SetFactors 1, Fac
Route.LoadDirection.Set 0, 0, -1 'définit le pas (non paramétré) Route.Step = 1 Cas.SetRoute Route

Rafal Gaweda
Product Support
Autodesk, Inc.



