I use many datasets generated outside of grasshopper and rhino within my workflows. I use Elefront to store all that object data within my rhino objects and things are good. Enter Speckle, wouldn’t it be nice to be able to call all that object data up within the web viewer?
The issue is that manually entering 45 data key names into the “Create Custom User Data” inputs would be a drag. So how can we automate this? Does this functionality already exist?
I see three options:
- Have users generate their own JSON and create a “Set User Json Data” (SUJD) component and document the standards for that json structure.
- Have a “Create Lots of Custom User Data” (CLUD) component with two inputs “Keys” and “Values” [no ZUI]
- Metahopper could be apart of this conversation. Metahopper can rename components, how about renaming component inputs?
I’ll explore hacking CUD to achieve #2, but C# is not my strength…
Hm, interesting shout. I had a teeny tiny look at user strings - pardon if i’m naming things wrong, it’s been a while - which i believe elefront uses; was even considering having it as the de facto user data plugin for speckle, but i needed (wanted) to support nesting props and such.
Some example files/objects with user strings would help in deciding this, but i can see for example, having either a
convert strings to user dictionary component; or alternatively, a component with two inputs, “keys” and “properties” where for each key you set a property - would this help?
I’ve been scripting a variant of #2. Making a component out of it shouldn’t be too hard!
Nice, that definitely looks like a very effective implantation. Does it allow nesting as well?
The idea of a
convert strings to user dictionary component seems valuable in the absince of the above. Would the String look like this?
I’m sure @TomSvilans is gonna share his CLUD component, or push it to the main repo Nesting can be done afterwards imho…
Maybe some info regarding how custom user data is implemented: it uses the
ArchivableDictionary that every
GometryBase object can have. There’s a conversion (that actually tom just fixed today ) that takes that dict and makes it a proper
Dictionary<string,object>. There’s really very little json involved in SpeckleCore until really at the end, when things get serialised for sending to server…
There’s a pull request for review once you’re done with your thesis
@nico if you’re impatient, you can pull my fork (wheeyyy) from GitHub - tsvilans/SpeckleRhino: Rhino 5 & 6 + Grasshopper Speckle Clients and build it to get the CLUD component.