Routines().Type not working
Newbe
✭
I am trying to fill a listView control with the names of the Procedures, Functions and traps from a module. I am able to fill the listView with the names but when I try and parse what type of Routine it is all I get from the Type parameter is "Routine {7168}" it should parse to SymbolTypes below in the code. Is this a bug or am I doing it wrong?
Try
tasks = controller.Rapid.GetTasks()
Modules = tasks(0).GetModules()
TaskName = tasks(0).Name.ToString
Routines = Modules(0).GetRoutines()
Dim Number As Integer = Convert.ToInt32(Routines.GetUpperBound(0))
ListView3.Items.Clear()
Dim item As ListViewItem
For i As Integer = 0 To Number
item = New ListViewItem(Routines(i).Name.ToString)
If Routines(i).Type = SymbolTypes.Procedure Then
item.SubItems.Add("PROC")
ElseIf Routines(i).Type = SymbolTypes.Function Then
item.SubItems.Add("FUNC")
ElseIf Routines(i).Type = SymbolTypes.Trap Then
item.SubItems.Add("TRAP")
End If
ListView3.Items.Add(item)
Next
Catch ex As Exception
MessageBox.Show(ex.Message.ToString, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information)
End Try
Try
tasks = controller.Rapid.GetTasks()
Modules = tasks(0).GetModules()
TaskName = tasks(0).Name.ToString
Routines = Modules(0).GetRoutines()
Dim Number As Integer = Convert.ToInt32(Routines.GetUpperBound(0))
ListView3.Items.Clear()
Dim item As ListViewItem
For i As Integer = 0 To Number
item = New ListViewItem(Routines(i).Name.ToString)
If Routines(i).Type = SymbolTypes.Procedure Then
item.SubItems.Add("PROC")
ElseIf Routines(i).Type = SymbolTypes.Function Then
item.SubItems.Add("FUNC")
ElseIf Routines(i).Type = SymbolTypes.Trap Then
item.SubItems.Add("TRAP")
End If
ListView3.Items.Add(item)
Next
Catch ex As Exception
MessageBox.Show(ex.Message.ToString, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information)
End Try
0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings