RobotStudio API Question
shurd
✭
Hi all,
I was wondering if anyone could give me an example for using the RibbonTab.SimulateClick() method for the RobotStudio API. The API documentation suggests that you pass SimulateClick() a string for the control ID that you want to simulate clicking. I've tried a few different options for using this (to help me create a custom Add-In for automating some path generation), but with no real success. By way of example, if I use...
UIEnvironment.RibbonTabs["Modeling"].SimulateClick("");
...then the RibbonTab shifts to displaying the "Modeling" tab. So far so good. However, if I use...
UIEnvironment.RibbonTabs["Modeling"].SimulateClick("CreateEmptyPart");
...to attempt to simulate clicking the "CreateEmptyPart" button, then the focus of the RibbonTab still shifts to displaying the "Modeling" tab, but I don't seem to have simulated the clicking of this particular button (I would've expected to see a new part appear in my station). Is there some more information that anyone could provide me to set me straight?
Many thanks!
0
Comments
-
Hi,
It seems the SimulateClick() method is not correctly implemented, so you can't use that. I've logged a bug report for that.
What you can (and should) do instead is to use CommandBarButton.Execute(), e.g.
[code]CommandBarButton.FromId("CreateEmptyPart").Execute();[/code]
regards,
Johannes
Johannes Weiman
Software Engineer
ABB Robotics0 -
Thanks Johannes!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)
- 786 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings