Grasshopper component signature through Visual Studio (for dummies)

Hello Guys

please tell me how to sign a component of a grasshopper written through a visual studio?
How do I sign a component C# Script Component connected through a node I know, but how through a visual studio?

I looked at the examples on the forum, but nowhere is there an example of detailed how to do this?

maybe someone has a piece of code on hand?

like this does not work
this.Message =“your message”;

in visual studio:

Message = "your messege"

You can check the documentation of the GH_Component class where that property and many other things live. Please also note that your Grasshopper component class inherits from GH_Component to override all the essential methods needed to be able to appear in the gh canvas.

1 Like

It should work like you said. Where did you put that code snippet? Constructor? BeforeSolveInstance() ? SolveInstance()?

1 Like

Thank you very much for the answer :slightly_smiling_face:
can you please give a screenshot of how and where to do it? :innocent: :innocent:

You can put it as part of your constructor if you want it to remain constant.
You can put it as part of your solve instance if you want it to change with each solve.
You can put it almost anywhere inside the class as long as the component will call the function that has the statement in it.
some examples:


1 Like

Thank you very much for the detailed example, now I will try to do :slightly_smiling_face: :+1: :innocent: :grinning: