RobotStudio event

Where is API Support?

I'd like to know where we can get support on RobotStudio API and where we could find some Visual Basic or Visual C++ code sample or program to help us start our development with the API.

Thank you very much.

Jerome Pouliot

Comments

  • Hi Jerome,

    in the API documentation (help file) file you can find code examples that shows how to use some specific objects and methods.

    Depedning on what you want to do, we might have some code from internal projects, that I can prepare and post here.

     


    Best Regards, Niklas Skoglund
    ABB Robotics

    Developer Center
    RobotStudio Blog
  • We'd like to know where the starting point to work with RobotStudio API is.<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

    1.       Can we control RobotStudio as an object from an outside Visual Basic program using the API?  

    2.       If so what is the name of the Reference we must choose? All we have found is `ABB CmFwdKinIrb940 1.0 Type library' and `ABB Robotics CmFwdKinIrb340 2.0 Type Library' and what we have here is an IRC5 IRB2400.

    3.       What is the name of the `Automation Object'?  Normally it is called like this :

    Set ExcelSheet = CreateObject("Excel.Sheet")

    4.       In the previous example "Excel.Sheet" is the `Automation Object'.  Can you give me the `Automation Object' use to control RobotStudio?

    5.       Can we build program inside RobotStudio in Visual Basic for Application like in Microsoft Excel and Word?

    6.       Is there a Macro recorder?

    7.       Where is the starting point to create Macro if it is possible?

    8.       We are looking to create a program that would allow the robot in RobotStudio to move to a position specified in our program. It could be a position saved in Microsoft Excel. A sample of code to do that would be very appreciated!

    Thank you very much for your support,

    Jerome Pouliot

  • Hello Jerome,

    1-4: RobotStudio 5.x cannot be controlled via automation/COM as the API is .NET based.
    5. RobotStudio 5.x includes Visual Studio Tools for Applications (VSTA) which is the .NET equivalent of VBA. VSTA supports VB.NET and C#.
    6. No
    7-8. The VSTA project templates describe how to create a macro and also contain some API sample code.

    Also note that besides VSTA, you can also create an add-in with Visual Studio 2005/2008 (or Visual Studio Express). That type of add-in does not support macros though.

    regards,
    Johannes

    Johannes Weiman
    Software Engineer
    ABB Robotics
  • Thanks Johannes.

    1-Can we have VSTA from ABB or we must buy it from Microsoft? And if so how much does it cost?

    2-Can we control RobotStudio from OUTSIDE with Visual Studio 2005 or Visual Studio Tools for Application or other? We really need to be able to control RobotStudio from an outside software.

    Thanks for your support,

    Jerome

  • Hi Jerome,

    1: VSTA is included with RS and can be opened from the Tools menu. No additional cost.

    2: In principle, RobotStudio is event driven and I suppose you can generate those events from your add-in. How the add-in generates those events is up to the author of the add-in.

    A rule of thumb:
    Small, basic add-in: VSTA
    Advanced add-in: Standard add-in written in, say, VS 2005 Express (which is also free of charge).

    Kind regard,

    Henrik

     

     

     

    Henrik Berlin2008-4-9 16:29:42
    Henrik Berlin
    ABB
  • Hi,

    I would like taking infomations from RobotStudio with VSTA in Visual Basic.

    For exemple get value of X,Y or Z of the Robot in space and showed it with a MsgBox.

    But I don't find the function.

    Dim var As Boolean

    var = ABB.Robotics.RobotStudio.Stations. ???


    MsgBox(var)
    Do I import my Project in VSTA before ?

    How to get value and properties of a station? how to manipulate data of the station by visual Basic ?  


     
    Thanks for your support,
    Thibaud

     



  • Maybe you should search the forum for "ActiveProject". There you will find many code-examples.

    You get the station and the first controller of the station by these lines (have to be translated to VB).

    [code]Station station = Project.ActiveProject as Station;
    RsIrc5Controller aController = station.Irc5Controllers[0];
    [/code]

    Does it work on VB? Do you get along with this hint?

    MaWi812008-4-16 10:3:2
  • Thank you very much,

    your code helped me, and normally it does work.<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

    But I have an other problem, I don't find a function who I can use to get information from this project. I would like to see X position from my Project tool (I work with ABB RobotStudio).


     
    thanks
    Thibaud2008-4-17 16:39:19
  • Hi,

    We would like to get a Robot curent position through the API of RobotStudio. can someone help us find the right classes to get and set the position of the IRC5 Robot in real time ?

    does someone has a sample of code to give us ?

    thank you very much

    Thibaud

  • Hi,

    I have an other critical problem for my application.
    I need to select a part by its name (typing its name on the keyboard in a message box) and see it selected in RobotStudio, but I not able to find the right classes to do that. in this so that I can move the object.

    can someone help me to do that ?
    A sample of code would be appreciated.
    thanks
    thibaud




  • Hi thibaud,
    Try this:

    [code]string partName = ...
    Station station = Project.ActiveProject as Station;
    GraphicComponent part;
    if (station.GraphicComponents.TryGetGraphicComponent(partName, out part))
    {
        station.Selection.Add(part);
    }
    [/code]

    regards,
    Johannes

    Johannes Weiman
    Software Engineer
    ABB Robotics
  • Hello everybody,

    I'm trying to select with VSTA an external object imported from a CAD file. How can I do that with the API?

  • The object can be looked up by name or index. The imported CAD file will be available in the Parts collection.
    Henrik Berlin
    ABB
  • I'm looking for API support as well.. are there any examples you guys know of? I didn't see any examples posted.

    Cheers,
    Stan
  • There are some examples in the API documentation.

    Right now we are creating more examples to be included in the API documentation for RobotStudio 5.11.

    What would you like to see in the examples?


    Best Regards, Niklas Skoglund
    ABB Robotics

    Developer Center
    RobotStudio Blog