RobotStudio event

SmartComponent API

Options
Hi,

is it possible to create instances of existing SmartComponents (LineSensor, and so on) using the API? IS there any SmartComponentFactory or Manager class to achieve sth like:

SmartComponent sc = XYZFactory.CreateLineSensor()

or anything similiar?

Best regards.




Comments

  • Niklas Skoglund
    Options
    Hi Apox,
     

    the different smart components like Line Sensor and Rotator are libraries just like a tool for example.

     

    You can create an instance of a library by loading it from disk. All built in smart components are located under "C:Program FilesABB Industrial ITRobotics ITRobotStudio 5.13ABB LibraryComponents".

     

    This path is not documented and may change, but lets give it a try if you are curious.

    We can maybe provide a way to access the library store using the API, in the future.

     

    There is an example in the API documentation (GraphicComponentLibrary Properties Example), that shows how to add a library from disk.

     

    The first step would be;

     

    GraphicComponentLibrary myLib =  GraphicComponentLibrary.Load("Rotator.rslib");

     

     

    Best Regards, Niklas Skoglund
    ABB Robotics

    Developer Center
    RobotStudio Blog