SetData in RespondToMouseDoubleClick and Component opening Form

Dear Experts!
I work on a project and we use Rhino/Grasshopper API.
I have the following issues:

  1. I want to change the output of a Component by doubleclicking on the Component, but I don’t know how to access the (SetData) or similar methods for this. Is there any way to solve this problem?

  2. I have a component which opens a Windows.Forms form in the SolveInstance method. When I pick the component from the top toolbar, it runs perfectly, but when I doubleclick on the canvas and use search and select the component the form closes automatically.

Thanks for your help!

SetData belongs to IGH_DataAccess which is a shortcut to assign parameters from SolveInstance, so you have to assign the parameters yourself and perform all subsequent operations to make it work. In a parameter, you can set the data in VolatileData property or SetPersistentData() method / PersistentData property if it is GH_PersistentParam< T>. Good luck getting out of the GH flow :cowboy_hat_face:

I would not open a form from SolveInstance, instead I would overwrite the AddedToDocument() method and open the form there and also from a mouse handler. To solve this specific question you should publish your code.

Thanksfor your fast help!