Retrieve data from GH_Panel


I am trying to retrieve the data that is sent to a GH_Panel from a Rhinocommon C# plugin. I have access to the GH_Panel object and listen to the SolutionExpired event, but every time the solution expires, the VolatileData count is set to 0.

My question is : how to retrieve the data from a link? In this screen, I would like to access the value 4676.570622.

Thanks for your answers.

What are you planning to do with that data?

Why not hook that Result port to the component you wish to sent the data to?

Try in this context:

1 Like

I wan’t to retrieve the data into a Rhino panel, so I won’t use it anymore in Grasshopper

The event is on a GH_Document, so it will trigger on any component update, right?

No, when they’ve all been updated.

If I remember correctly, GH doesn’t tell you when a component is updated, but when it expires, which is somehow the opposite, it happens when the object needs to be updated again, and it will be updated in the next solution of the document, and when it finishes, you can be aware using that event.

1 Like

I get that but why from the panel?
You should get the data from the scripting component.
I don’t get completely what are you trying to do.

Because I know how a panel is structured. And the result may come from any component, with x inputs and y outputs, which will vary from one implementation to another. So the only known component to retrieve that data is the panel.

In any case, the SolutionEnd solves the problem completely, I can retrieve the VolatileData from the panel using it.

I would avoid retreiving data from a Panel (it may distort the data). If I understood your problem correctly, a Number component would provide you with that “single source” for a floating point value.

// Rolf

1 Like