RobotStudio event

Problem making target deleting addin

Options
Hello,

I'm having issues in making addin that deletes unused targets. I've done addin using this example http://developercenter.robotstudio.com/blobproxy/devcenter/RobotStudio/html/2aca5da4-6f94-43a0-9817-5f413d16f510.htm and my program is basically a copypaste of that.

When I load addin in Robotstudio I get following error:

RobotStudio .NET exception: Length cannot be less than zero.
Parameter name: length
============================================
Base exception: ArgumentOutOfRangeException
Length cannot be less than zero.
Parameter name: length
   at System.String.Substring(Int32 startIndex, Int32 length)
   at RobotStudio.ExtensionManagement.Addin.TryLoad()
ParamName:length


I have no idea what causes this. I'm using Robotstudio 2019.3 and RobotWare 6.10

If that error is in addin code, the line 32 would be "if (inst.Length == 0)".
I've tried to change that value to < 1 but no difference.
Addin.dll and Addin.rsaddin are located in ABB/RobotStudio 2019/Bin/Addins

Our robot is used in educational purposes, so the targets pile up pretty quickly and I'd like to use this to clean things up.

Comments

  • Tonibeibe
    Options
    I get the same error when i run this code:

    using System;
    using System.Collections.Generic;
    using System.Text;

    using ABB.Robotics.Math;
    using ABB.Robotics.RobotStudio;
    using ABB.Robotics.RobotStudio.Environment;
    using ABB.Robotics.RobotStudio.Stations;

    namespace RobotStudioEmptyAddin1
    {
        public class Class1
        {
            // This is the entry point which will be called when the Add-in is loaded
            public static void AddinMain()
            {
                System.Diagnostics.Debug.WriteLine("Hello world!");
            }
        }
    }

    Could it be, that I'm missing some package?