GraphicComponent Color

in RobotStudio
Hi,
I'm trying to change the Color of a GraphicComponent from the ABB.Robotics.RobotStudio.Station namespace, but it raises an exception saying "The given key was not present in the dictionary." Did anyone encounter this serious headache problem ever ?
Some code ...
[CODE]
try{
GraphicComponent boxesGroup = activeStation.GraphicComponents["BoxGroup1"];
boxesGroup.Color = System.Drawing.Color.Red; //Raises the exception
}
catch(Exception ex){
}
[/CODE]
0
Comments
-
Hi,are you using VSTA or have you created your Add-In with Visual Studio?VSTA does not support using types from the Windows.Drawing namespace.To set the color of a graphic component you can use this method on the VSTABridge class:0
-
Thanks Niklas, that worked0
Categories
- All Categories
- 5.6K RobotStudio
- 399 UpFeed
- 20 Tutorials
- 14 RobotApps
- 301 PowerPacs
- 406 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 338 IRC5
- 67 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 832 RAPID Programming
- 14 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 107 Collaborative Robots
- 5 Job listings