Is it possible to rename or extend the name of a MetaHopper wrapper so it appears as something other “DataWrapper containing X items” in the data tree? This would make it possible to be able to search the data tree for a particular wrapper. Is there already an alternative method of doing this?
That’s an interesting idea — it doesn’t exist currently but it certainly could. I think for compatibility with past components I would implement this as a hidden third Name input that you could expand with the ZUI (this is a somewhat controversial use of the ZUI so I could be convinced otherwise… I just like tight little components for something as commonly used as wrap/unwrap). It would take a single name per branch so if you give it ((A,B,C), (D,E,F), (G,H,I))
as your items to wrap you’d need to supply a single item per branch so that the name input would be ((My Name),(My Other Name), (My Third Name))
and the string preview would look like this: My Name (N=3)
or similar. What do you think?
An expanding input would be very nice. So if I’ve understood correctly are you thinking it would work something like this? It would be amazing if this could be made possible!
(sorry, the highlighted panel is meant to be a preview of what the Wrapped string preview would look like)
exactly!
Hi Andrew, I’ve been thinking about updating a single data stream method I’ve worked up for managing my complex definitions - I’m hoping to use JSON principles and the ability to name DataWrappers would have a fundamental influence on how I would go about it! Do you think that this functionality could be added anytime soon?
When you say Json principles… would a component that actually let you compose / decompose JSON be more useful to you? something like this?
This would work fairly well if you were mostly dealing with simple objects (text, booleans, etc) and be a little more difficult with complex objects (e.g. breps)
OK I implemented this in metahopper - but if the true JSON approach is interesting to you I’d be happy to share a pre-release copy of JSwan
updated metahopper now available on yak and food4rhino
It’s all pretty new to me but I was thinking a rudimentary approach could be to label the Metahopper wrapper as JSON object. So the name of the wrapper could hold a lot of information about the data inside it (and be searchable/readable in a grasshopper list if that makes sense? The first stumbling block I ran into though was passing data between instances of grasshopper… to do this I’m now wondering if complex objects could be wrapped up into a separate file and then referenced back in using JSON or would this be too slow? or just daft?!
JSwan looks amazing - I would love to try it!!
Btw, thanks so much for new Metahopper Names
If you want to play with jSwan it’s on the Rhino PackageManager!