RobotStudio event

VBA Example: Targets to Excel

This macro writes the coordinates for all targets into an Excel sheet. It's easy to modify it for other data.

Open VBA (Alt+F11) and import the form. You also need to put a reference to the  ABB RobotStudio MathUtility and Microsoft Excel

Good luck!

Targets2Xl.zip

Administrator37896,4825347222
/Martin Lundh
Product manager
ABB Robotics

Comments

  • I am very interested by importing targets from robot studio to excel file.

    I currently have a station with about 900 targets.image ..

    I have imported the formes in Robotstudio and Excel but maybe because I am not so familiar with Visual basic I don't understand your sentance "You also need to put a reference to the  ABB RobotStudio MathUtility and Microsoft Excel". I didn't find any "mathutility anywhere" neither in excel nor in robot studio. Would it be possible to get more explaination.

    Thanks


  • I see there is solution to export the targets from RS to Excel.

    Is there any solution for the reverse. ..

    Say Load the RS station with target loaded in excel file Ouch.

     

  • Do like this.

    1. From RobotStudio open VBA (Tools/Macro/Visual basic Editor)

    2. Import the form (*.frm) in VBA (File/Import File)

    3. In VBA, goto Tools/References. In the list that pops up, select "ABB RobotStudio Matyh Utility" and "Microsoft Excel Object Library"

    4. In VBA, Double-click on the form in the Project explorer, then select Run/Run UserForm (F5)

    It's quite easy to write a macro that imports from Excel to RS, but I don't have time right now. Maybe someone else has?

    /Martin Lundh
    Product manager
    ABB Robotics
  • Here is another excel example:

    Xlmacro.zip

    Administrator37896,4827546296
  • Hey Guys, I tried to follow your instrucation but I am a little bit lost. I don't know how I could open VBA in Robotstudio, could someone help me please? 
    Thanks