I am writing an add-in to Robotstudio using Visual Studio and C# in order to test the camera view manipulation possibilities. I have made several add-ins before in Visual Basic without problems, but now in C# I seem to be having problems getting RobotStudio to recognize/load the Add-in. While I have more code in my add-in the following is sufficient for me to cause the problem:
The add-in created with the following code is found by Robotstudio without any problems:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ABB.Robotics.Math;
using ABB.Robotics.RobotStudio;
using ABB.Robotics.RobotStudio.Environment;
using ABB.Robotics.RobotStudio.Stations;
using ABB.Robotics.RobotStudio.Stations.Forms;
namespace StereoTest
{
public class Stereoscopic
{
public static void AddinMain()
{
Project.UndoContext.BeginUndoStep(“CameraProperties”);
try
{
// Create a new tab.
RibbonTab ribbonTab = new RibbonTab(“Stereo”, “Stereo”);
UIEnvironment.RibbonTabs.Add(ribbonTab);
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
}
}
}
However, If I mention the class “Camera” at all, the add-in fails to be recognized by RobotStudio and is not loaded nor is it found under the “general” folder in add-ins. For example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ABB.Robotics.Math;
using ABB.Robotics.RobotStudio;
using ABB.Robotics.RobotStudio.Environment;
using ABB.Robotics.RobotStudio.Stations;
using ABB.Robotics.RobotStudio.Stations.Forms;
namespace StereoTest
{
public class Stereoscopic
{
public static void AddinMain()
{
Project.UndoContext.BeginUndoStep(“CameraProperties”);
try
{
Camera myCam = new Camera();
// Create a new tab.
RibbonTab ribbonTab = new RibbonTab(“Stereo”, “Stereo”);
UIEnvironment.RibbonTabs.Add(ribbonTab);}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
}
}
}
In the actual application I have the camera code in an event handler for a button being pushed but this seems to be irrelavent for the problem. I’ve also noticed that not only does references to the “Camera” class cause the problem but also references to the “Station” class.
Any ideas as to what could be causing this?