Internalise data (by Metahopper or VB/C# code)

Hello,

It would be usefulll to be able, from Grasshopper, to activate “Internalise data” function in parameters.

Is it possible to get it in a further version of Metahopper ? Or to achieve this with some VB/C# component ?

JL

Hello,

yes you can achieve this by script. Everything written in C#, no matter if marked as public or private can be triggered by reflection or by using user32.dll.
I’m not sure if there is a public method to internalise data but you can browse Grasshopper.chm for it.
You could also reverse engineer this process , which is basically nothing more as serialising data into GH -(there is a function for it), and deleting active references.
Another alternative: save current geometric properties in a file and retrieve geometry from there and just switch between file data and your parameter component.
Is this useful, I don’t know, probably nobody did it because its not that useful. Usually input parameter components should be of low count. if not you did something wrong.

I’d highly recommend @davestasiuk’s Pack Data and Unpack Data components from Treesloth for writing/reading arbitrary data to/from files. For instance, all the data from these search runs were recorded (using GHPython) and saved to file using these components.

Just added “Internalize Param Data” to MetaHopper. Download the prerelease for testing:
MetaHopper.gha (268.5 KB)

internalize_mh

3 Likes

Great! it works fine. Thank you !

I suggest to add an output to the Internalize component, in order to do something when the internalise operation is done.

Yes, a boolean (internalized = true) output would do.

// Rolf

Hi @andheum, what about value list? Any recommendation?

That solution works fine, but is there any posibility to “update” the data while pressing the button? Like connecting again to the first value, and then internalizing again.