RobotStudio event

Forms in VSTA

Options

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

I'm doing some plug-ins for Robot Studio and wanted to get some user input into my macros. However, I realized that I cannot have any dialogs in them, e.g. SaveFileDialog. I tried, using namespace System.Windows.Forms, but Robot Studio froze when I executed Dialog.ShowDialog(). I guess that that VSTA is not intended for that type of functionality.

I was wondering whether it is possible to use user dialogs and graphical forms if I do a "real plug-in", instead of a VSTA macro? (Asking this here before I start asking around for a Visual Studio installation here at the office..)

Best regards,

Mikael

 

Comments

  • Niklas Skoglund
    Options

    Hi Mikael,

    if you use VisualStudio to create an AddIn you can use Systems.Windows.Forms without problems.

     


    Best Regards, Niklas Skoglund
    ABB Robotics

    Developer Center
    RobotStudio Blog
  • Mikael
    Options

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

     

    thanks!

    I will create a real AddIn instead. I use my macros now in VSTA, but they are not so easily used without any user dialogs.

    I have another question: When I run VSTA macros, Robot Studio freezes while executing the macro, e.g. I cannot rotate the view. Is it the same with the real AddIns, or are they threaded so that I can run several of them in parallel and manually access the user interface while doing so?

    BR

    Mikael

     

  • A hosted AddIn (non VSTA AddIn) is loaded in to the same application domain as RobotStudio.

    The entry point, and callbacks from the UIEnvironment like execution of commands, are called from the main UI thread.

    If you want you can create your own threads in the AddIn, but be aware that the API is not thread safe.

    By the way some EventTable actions (check out the Event Manager in the user interface if you are not familiar with it) are threaded internally. For example you can setup the EventTable to move the robot between two poses when a signal goes high, without freezing the UI. This can be done from VSTA as well.

    Niklas Skoglund2008-8-1 8:43:12

    Best Regards, Niklas Skoglund
    ABB Robotics

    Developer Center
    RobotStudio Blog