Is there any possibility to create an RsIrc5Controller with the API?
I can access the active Irc5Controllers via station.Irc5Controllers, but I can’t find any possibility to add a new Controller to a new station.
This is what I do to create a new station:
Station station = new Station();
Project.ActiveProject = station;
GraphicControl gc = new GraphicControl();
DocumentWindow dw = new DocumentWindow("dw", gc, "myView");
gc.RootObject = station;
GraphicComponentLibrary gcl = GraphicComponentLibrary.Load(@"C:....",true);
station.GraphicComponents.Add(gcl.RootComponent.CopyInstance ());
dw.Visible = true;
UIEnviroment.Windows.Add(dw);
This snippet creates a new station with a (geometry of a) robot in it.
Now I need to know how to attach a new Controller to the station.
It would be very nice if someone could help me.
There are no errors so far, but the controller doesn’t appear in the bottom right hand corner in RobotStudio.
When I try to restart the Controller with ABB.Internal.Robotstudio.API.ControllerHelper.Restart(ctrl, ABB.Internal.Robotstudio.API.ControllerRestartMode.Cold);
Robotstudio crashes.
I can’t figure out why this doesn’t work.
Any suggestions?