Reading Modul names with RAB
7seven
✭
Hello everybody,
i would like to read out all the modules(as string) of the Robotcontroller and would like to put them listed in a combobox!
Anyone an idea how i can solve this problem
------
I tried some things out (in VB) but nothing really work by now.
tRob1 = ctrl.Rapid.GetTask("T_ROB1")
RSCol = tRob1.SearchRapidSymbol(SProp, "Module", String.Empty)
Is "Module" correct? Or must it be "mod" or "modul"
And after that how can i read out "RSCol"
Maybe this is the complete wrong way, i don't know
Anyone an idea?
Cheers "7"
7seven2011-08-05 11:31:12
0
Comments
-
This is the code i use in VS2008 VBDim TaskName As String = "T_ROB1"Dim modulantal As Integer = robotController1.Rapid.GetTask(TaskName).GetModules.CountComboBoxModules.Items.Clear()
For i = 0 To modulantal - 1
Dim modul As RapidDomain.Module = robotController1.Rapid.GetTask(TaskName).GetModules(i)
ComboBoxModules.Items.Add(modul.Name)
Next
ComboBoxModules.SelectedIndex = 0
Best Regards
Klaus Soenderhegn
www.cadalysator.dk0 -
[QUOTE=Klaus]
This is the code i use in VS2008 VBDim TaskName As String = "T_ROB1"Dim modulantal As Integer = robotController1.Rapid.GetTask(TaskName).GetModules.CountComboBoxModules.Items.Clear()
For i = 0 To modulantal - 1
Dim modul As RapidDomain.Module = robotController1.Rapid.GetTask(TaskName).GetModules(i)
ComboBoxModules.Items.Add(modul.Name)
Next
ComboBoxModules.SelectedIndex = 0
Thanks a lot Klaus, this one really help me out
But i had to change one thing!I had to replace GetModules.Count with GetModules.Length
I don't know why. Anway, it works
Once again thank you for the code.
Cheers "7"
0 -
super that it worksBest Regards
Klaus Soenderhegn
www.cadalysator.dk0
Categories
- All Categories
- 5.5K RobotStudio
- 397 UpFeed
- 18 Tutorials
- 13 RobotApps
- 299 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 319 IRC5
- 63 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 804 RAPID Programming
- 4 AppStudio
- 3 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings