algorithmic modeling for Rhino
Hello everybody,
I'm trying to break the GH calculation flow and export some data trees at a given point, to import them again in another GH file. How can I export a data tree and keep the data structure, then import it again in another file? I have to deal with a lot of data, then text file or xml is preferable to xls solutions.
Thanks a lot,
Tags:
Hi Pietro,
unfortunately there are no water tight solutions, as a tree can only be (de)serialized if the data type inside the tree supports that. And even if the data does support it, it's not exactly easy. I'll need to have a good long look at how Grasshopper handles this internally to see if it can be used from within a C# component.
I got stuck trying to get an IGH_Structure out of the C# component. This would be a lot more doable using proper components. My effort are attached, but are obviously pretty useless so far.
Hello Pietro
if text file etc is not an absolute must, you can also give a try to treesloth pack unpack data components.
best
alex
Hi Pietro-
As Alex says, Treesloth has two components that are designed to do that. They create/read special .DAT binary files, and are able to write (in addition to the primary geometry types) numbers, strings, integers, booleans and domains, while retaining any data structure.
Wow, that's good to know. Was always wondering how to do that and Treesloth seems like a good solution!
this worked fine! Thank you
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by