- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to select only the simple cases before I print my reaction forces to csv.
However, reading through the documentation, I do find options to create cases, but I do not find a way to select a case for a table. I loop through the tables, and certain ones are "printed" to csv. However, now Reactions are all cases, I only want simple cases.
I tried to implement a solution given by @Stephane.kapetanovic
However, this does not seem to work. I would prefer to just the loadcase just for one table, because for the stresses and ratios I do want the combinations to be included.
Dim ViewMngr As IRobotViewMngr
Dim ActiveView As RobotView
Dim CaseSel As RobotSelection
Dim ActiveViewNumber As Long
ViewMngr = RobApp.Project.ViewMngr
For k = 1 To ViewMngr.ViewCount
If ViewMngr.GetView(k).Window.IsActive = -1 Then ActiveViewNumber = k : Exit For
Next k
ActiveView = ViewMngr.GetView(ActiveViewNumber)
CaseSel = ActiveView.Selection.Get(IRobotObjectType.I_OT_CASE)
CaseSel.FromText("Simple Cases")
ViewMngr.Refresh()
Console.WriteLine("Selected Simple Cases" & vbCrLf)
Now it crashes on line 10 (line 198 in the full script) with the message:
System.NullReferenceException
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=RobotAPI
StackTrace:
at RobotAPI.Program.DumpTables() in C:\Users\Jelle.visser\source\repos\RobotAPI\RobotAPI\Program.vb:line 198
Solved! Go to Solution.