Asked — Edited

Need Help With Plugin

I need some help with a plugin I am working on. I am new to C# and OOP. Have went thru the Tutorial and the SDK Tutorials also.

User-inserted image

How do I get the values from the form in to my C# code?

 public enum LocationType
            {
                Wall = 255,
                Empty = 0,
                Destination = 254,
                Source = 1
            }
            public struct Location
            {

instead of Wall = 255, how do I get Wall = textBox1.Text. textBox1 being the Textbox name.

Thanks RichardZ


ARC Pro

Upgrade to ARC Pro

Discover the limitless potential of robot programming with Synthiam ARC Pro – where innovation and creativity meet seamlessly.

PRO
Synthiam
#17  

You got it! That's the correct code as posted.

Or since you know the size of the array, you can do this...



VariableManager.CreateVariableArray("$Disp2",0, map.GetLength(0) * map.GetLength(1));

int index = 0;

                for (int x1 = 0; x1 < map.GetLength(0); x1++)
                {
                    for (int y1 = 0; y1 < map.GetLength(1); y1++)
                    {
                        disp = map[x1, y1].ToString();
                        
                        VariableManager.SetVariable("$Disp2", disp, index)

                      index++;
                    }
            
                }