RobotStudio event

How to add an existing system to an station with an Addin

Good morning,

I would like to know how to add ( sample code if possible) of how to add an existing system to an station with an addin. I do not want to add an existing robot ( of this there are several examples in developercenter)I want to add the complete system with logic.

Thank you very much

Best Answer

  • DiegoVilac
    Answer ✓
    As feedback ,this is the solution. However its very strange:
     myImportedSystem.StartAsync(VirtualControllerRestartMode.WarmStart,myMechanismList ); 
    myMechanismList is totally void ! (?¿)


     public static void ImportSystem(string SystemPath)
            {

                Station myStation = Project.ActiveProject as Station;
                RsIrc5Controller myImportedSystem = new RsIrc5Controller(SystemPath);
                List<Mechanism> myMechanismList=new List<Mechanism>();
                myStation.Irc5Controllers.Add(myImportedSystem);
                myImportedSystem.StartAsync(VirtualControllerRestartMode.WarmStart,myMechanismList );       

            
            }

Answers

  • Im trying to figure out the same thing, i have built an addin that creates a virtual system and RsIrc5Controller from an excel sheet, I can see that your issue is that your trying to parse an empty mechanism list.... need to find out how to select the mechanism library available here C:\Program Files (x86)\ABB Industrial IT\Robotics IT\RobotStudio 6.06\ABB Library\Robots If you figure it out let me know!