Getrss icon Getrss — Fetch RSS via GetRSS command; populates $RSSSuccess, $RSSErrorMsg and arrays $RSSTitles, $RSSDescriptions, $RSSLinks, $RSSDates for scripts. Try it →
Asked — Edited
2 Participants
Need Help With Plugin

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

ARC Pro will give you immediate updates and new features needed to unleash your robot's potential!

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#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++;
                    }
            
                }