RobotStudio event

VSTA User Add In - Load Error

Options
Hi everybody,
 

I was trying to code an add-in, using VSTA on RS 5.12.

Just for trying,  I was building the empty C# template (code pasted below).

 

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


namespace RobotStudioAddIn1
{
    public partial class ThisApplication
    {
        // This method is called when the addin is loaded into RobotStudio.
        public void AddInStartup()
        {
            // TODO: Add startup code here. Create toolbars, etc.
        }

        // This method is called when the addin is unloaded from RobotStudio.
        public void AddInShutdown()
        {
            // TODO: Add cleanup code here. Remove toolbars, etc.
        }

        // Default sample Macro. Can be removed.
        // Note: A Macro is defined as a "public void" method, with
        // no arguments and with a name that starts with "Macro_"
        // Other methods will not be visible from the Addin Browser.
        public void Macro_Sample1()
        {
            // TODO: Define actions to perform when the Macro is invoked.
            Logger.AddMessage(new LogMessage("Macro_Sample1 output window message."));
        }
    }
}

 

 

But when from RS "Add-ins" menu I try to "Load Add-In", following error is displayed:

 

RobotStudio .NET exception: Unknown Error: Load Add-In
============================================
Base exception: FileNotFoundException
Could not load file or assembly 'ABB.Robotics.RobotStudio.CustomContracts, Version=1.1.0.0, Culture=neutral, PublicKeyToken=d4b3480564cc872e' or one of its dependencies. The system cannot find the file specified.
   at ABBInternal.VstaServices.VstaAddIn.LoadAddInInProc()
   at ABBInternal.VstaServices.VstaAddIn.Load()
   at ABBInternal.StationManagement.VSTA.VstaCommands.VSTABrowser_ExecuteCommand(Object sender, ExecuteCommandEventArgs e)
   at ABB.Robotics.RobotStudio.Environment.CommandBarButton.RaiseExecuteCommand()


 

Some hint?

Thanks.

Comments

  • vmiegel
    Options
    Hi,
     did you build your VSTA addin ?

     


    image

     

    After building you should see your macro in RS:

     

    image

    //Volker
  • NFC
    Options
    Thank you for the answer,
     

    1) Yes I built it;

     

    2) What I see in RS is:

     

    image

    Add Icon is slightly different and do not have any "+" sign near it.

     

    Nils.
  • Niklas Skoglund
    Options

    Hi Nils,

    its seems like the assembly ABB.Robotics.RobotStudio.CustomContracts.dll can not be found in the Global Assembly Cache (GAC).

    This assembly should be installed by the RobotStudio installer.

     

    Explore the GAC (C:WINDOWSassembly) and verify if the file exists: 

    image

     The above picture shows parts of the GAC content on my test machine.

     

     

    Best Regards, Niklas Skoglund
    ABB Robotics

    Developer Center
    RobotStudio Blog
  • NFC
    Options

    Hi,

    thank you for your answer.

    I was searching the entire C drive for "ABB.Robotics.RobotStudio.CustomContracts.dll" without any result.

    Spite I have on my PC WinXp Pro SP2, please note that windows folder is "C:WINNT" and not "C:WINDOWS" ( I think it's an old I.T. department habbit since windows NT ).

     

    A) Non standard Win folder path, could mean something?

    B) Where can I fetch this dll and how can I manually install it?

     

    Thanks a lot,

    Nils.
  • Niklas Skoglund
    Options
    Hi Nils,
     

    the location can be "C:WINDOWSassembly" "C:WINNTassembly" depending on you operating system and installation.

     

    I'll mail you the assembly and you can install it by dragging it into the GAC folder. (Detach it to your desktop and drag it into c:winntassembly).

     

    Which version of RobotStudio did you have installed before you installed 5.12?

    The missing assembly seems like an installation problem.

     

     

    Best Regards, Niklas Skoglund
    ABB Robotics

    Developer Center
    RobotStudio Blog
  • NFC
    Options
    Yes Niklas!
     

    It works! I was just dragging how you suggested the "ABB.Robotics.RobotStudio.CustomContracts.dll" you sent me via email on "C:WINNTassembly".

    Started RS again and now it works.

     

    Previous RS version I had before 5.12 was 5.11.01.

     

    Thank you very much,

    Nils.
This discussion has been closed.