RobotStudio event

RSSDK: How to create a VB.NET RobotStudio add-in



Got this question on support so I thought I would make a short topic on it.
 


In this example I will do it in Visual Studio 2010, but it
works the same in 2012.



Start Visual Studio



File > New > Project (select a Visual Basic ?_" Class
Library ?_" project)

<?: prefix = v ns = "urn:schemas-microsoft-com:vml" />
















<?: prefix = o ns = "urn:schemas-microsoft-com:office:office" />



image 



In the Solution Explorer right click the project and select
[Add Reference]

Click the [Browse] tab and browse to

C:Program FilesABB Industrial ITRobotics ITRobotStudio 5.15Bin

and add the following:

ABB.Robotics.Math.dll

ABB.Robotics.RobotStudio.dll

ABB.Robotics.RobotStudio.Environment.dll

ABB.Robotics.RobotStudio.Stations.dll

ABB.Robotics.RobotStudio.Stations.Forms.dll

image



Now we need to use those references, in VB that is ?_oImports?__
put it at the top.

Imports
ABB.Robotics.Math

Imports ABB.Robotics.RobotStudio

Imports ABB.Robotics.RobotStudio.Environment

Imports ABB.Robotics.RobotStudio.Stations

Imports ABB.Robotics.RobotStudio.Stations.Forms



Then add this comment text for clarity:

' To
activate this Add-In you have to copy the dll to the RobotStudio Add-In
directory, typically



' C:Program FilesCommon FilesABB
Industrial ITRobotics ITRobotStudioAddIns



 



Last we need the entry point (this is the only part that tells RS that it
is actually an addin.

Public Class
Class1



    'This is the entry point for the Add-In



    Public Shared Sub AddinMain()



        'Logger.AddMessage("Hello World!")



    End Sub



End Class



 



Now if you don?_Tt want to do that every time you can make it
into a template:



File > Export Template

 
This is the topic for C#