RobotStudio event

How to use .NET method

Options
Hi, is anyone familiar with how to use the "Call .NET Method" option in the "Advanced" menu?

Comments

  • Abhishek PM
    Options

    Hi,

    For example you can Create a C# library class returning a bool value.
    Now .NET method should be visible in the project,
    Inoder to acheive this,
    Go to Properties ribbon tab of ScreenMaker ,  select Advanced tab and Add the dll created from the library as a reference.
    Then the methods that have declared should be visible when Call .NET method is selected in the Advanced menu.
    If you wish to no longer to use this library, remove the reference and the actions that have been created using for this library using 'Call .NET Method'

    Thanks

     
  • Hi, thank you for your reply. Could you please pass me a sample program of the .NET method and the .dll file as well?
  • Hi,
    i'm searching for a sample-program for such a .NET method, too.
    Is it possible to send me the file as well??

    I would be deeply grateful.
    Thanks

    (sorry, i hope my English understandable ;-)  )

  • Hi, can you give me your email so that I can send the sample to you directly?
  • I sent you a pm

    Thanks!!!

  • granale
    Options
    Hello Yuxi Wang,
     

    can you send me the example also? Thanks!

     

    granale
  • Can I have an example too?
    Thanks in advance!

     

    Regards
    Wojciech Wlodarski
    PLABB
  • Gomez
    Options
    Hi!
    Anyone can send me an example file please?


    Thanks in advance!

     

    Regards

  • Abhishek PM
    Options
    Hello,
     

    Here is a simple DotNetMethod implementation.

     


     

    Thanks
  • Gomez
    Options
    Thanks a lot..

    but I have a question: I have written a simple .net method, I want to save an image, it works when called by another form, but in Screen Maker, after having added dll-reference, it doesn't appear any method..why???


    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Drawing;

    namespace CreateGraph
    {
        public class Graph
        {
            public static void Salvaimmagine(Point[] p)
            {
              Bitmap image = new Bitmap(500, 500);
              .......................
              ...................
               image.Save("immagine.jpeg");

            }

        }
    }


    Why?

    Thanks in advance

    BR
  • Abhishek PM
    Options
    Hello,
     

    SM only will provide access to the static methods which contains basic data types: string, int, double, boolean, object.

     

    Refer to this link:


     

    Thanks
  • wow. Thanks for this sample.  I am going to implement it ,