Problem with Assign data to parameter in C#

I’m currently developing my first Rhino plug in C# for my application. I am new to programming and have been able to get my plug in to run in rhino. It manages to open Grasshopper and my file, however, I am currently having problems with the assigndatatoparameter method.

I am getting the following message in Workvisual : “Grasshopper.Plugin.GH_RhinoScriptInterface’ does not contain a definition for 'AssignDatatoParameter”. I am trying to assign some data i get in rhino, such as breps or points to a grasshopper parameter. Most of the responses I have found that uses this method are using python, so I was wondering if there is a different way to do it in c#?


Moved to Developer category

Moved to Grasshopper Developer category.

To be clear, you are making a Rhino plugin, i.e. an RHP file?

Yes I am making an RHP file. The Rhino plug in allows the user to input their custom data and inside this, I have a method that opens Grasshopper, loads the file and I want to know if it is possible to assign some data to grasshopper parameters as well.

I had to rush home since the plumbers came to unclog my drains, but I’ll have to do some experimenting to see what the easiest approach is here. If you’re happy referencing Grasshopper.dll it’ll be easier but it’s probably possible without using either Reflection or dynamic.

Hi David,
Thanks for the help! I don’t mind referencing Grasshopper.dll. So far, I’ve been trying to reference it but had no luck. I have written some commands in WorkVisual to get points and breps from my plugin, that is working well, but I would like to send the info collected to some parameters in Grasshopper so I can run my solution.