Add-In tab removed from ribbon when closing a PowerPac
sehe
✭
Hello,
I'm developing a RobotStudio add-in. I add a tab to the ribbon when my add-in starts up. I've found that if I also start ArcWelding PowerPac or Machining PowerPac, then press the close button in the top bar, it removes my tab from the ribbon.
Is this the expected behavior? Is there any way to keep my tab in the ribbon when closing a PowerPac?
Thank you for the help.
I'm developing a RobotStudio add-in. I add a tab to the ribbon when my add-in starts up. I've found that if I also start ArcWelding PowerPac or Machining PowerPac, then press the close button in the top bar, it removes my tab from the ribbon.
Is this the expected behavior? Is there any way to keep my tab in the ribbon when closing a PowerPac?
Thank you for the help.
Tagged:
0
Comments
-
Hi,
All non-standard tabs are set to invisible when a PowerPac is closed.
This piece of code should fix the problem:
CommandBarButton.FromID("DeactivatePowerPac").ExecuteCommand += (s, e) => UIEnvironment.RibbonTabs["MyTab"].Visible = true;
Regards,
Johannes
Johannes Weiman
Software Engineer
RobotStudio Team, ABB Robotics1 -
Hi Johannes,
Thank you for the quick response. I am not able to get the event handler to execute when the DeactivatePowerPac button is pressed. I tried adding event handlers to the other events (UpdateCommandUI and TrackCommandBarControl) on that CommandBarButton, but none of them seem to execute.
Am I trying to attach to the events incorrectly?
I can see the event come through If I add an event handler to UIEnvironment.ExecutedCommand. I can then check if the control's ID is DeactivatePowerPac and set my tab to visible again. The downside to this is that I have to filter out all the events that aren't relevant.
Thank you,
sehe
0 -
Sorry about that, I forgot that ExecuteCommand etc are a bit nonstandard as they are only sent to one subscriber. But I think ExecutedCommand is a good alternative in this case.
Regards,
Johannes
Johannes Weiman
Software Engineer
RobotStudio Team, ABB Robotics0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 798 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings