From the course: Grasshopper and Rhino: C# Scripting

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Data access

Data access

From the course: Grasshopper and Rhino: C# Scripting

Start my 1-month free trial

Data access

- Having just looked at the script structure of the C sharp component. Let's now take a closer look at the run script method within the editor. Go ahead and open up the exercise file for this lesson if you don't already have it up. As you can see, I've already gone ahead and created a range of numbers zero through to 10 and placed a C sharp component. Let's start by inputting those numbers into the X parameter of the C-sharp component and open it up. In this run script method, which executes when the C sharp component runs. We can see that these parameters are shown in the parentheses after the run script name. As you can probably guess this relates to the inputs on the component. So we have an x input and a y input. We also have a, as the output. The output parameter is marked with this ref keyword, which is a keyword used specifically in C sharp. It generally refers to this parameter as being a reference to another…

Contents