
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello!
I have written a script in VBA in Excel to get some reactions. In my computer I have Robot 2014.
When I try to apply it to a model created in Robot 2013, none of the Robot objects work and the script stops in the first line.
I have tried to save the model with a different name, but that doesn't seem to convert it into Robot 2014.
The same sintaxis work fine in a different model created in 2014.
Any ideas on how to make the code work?
My code:
Public RobApp As RobotApplication
Sub GetForcesinSlabPanels()
'%%%%% Robot Objects %%%%%%%%%%%%%
'Nodes
Dim NodeSel As RobotSelection
Dim NodeCol As RobotNodeCollection
Dim RNode As RobotNode
Dim n_i As Long 'Node counter
'PANEL
Dim PanelSel As RobotSelection
Dim PanelCol As RobotObjObjectCollection
Dim p_i As Long 'Panel counter
Dim RPanel As RobotObjObject
Dim obj As RobotObjObject
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
'Step 0 - 'Open Robot model___________________________________________________________________
'Get hold of Robot Application
Set RobApp = New RobotApplication
If Not RobApp.Visible Then
Set RobApp = Nothing
MsgBox "Open Robot and load Model", vbOKOnly, "ERROR"
Exit Sub
End If
'Step 1 - 'Get panels already selected_________________________________________________________
Set PanelSel = RobApp.Project.Structure.Selections.Get(I_OT_PANEL) 'PANEL selection
Set PanelCol = RobApp.Project.Structure.Objects.GetMany(PanelSel) 'Panel collection
2) Another question:
How to disable the Robot warnings you get when you try to change something in the structure that will affect the results.
Many thanks!
V.
Solved! Go to Solution.