I am trying to access userString (object attributes) exported from Rhino using Speckle into Revit using Dynamo. On the online viewer, I can see that the data is there under userStrings - however, I can’t seem to view/access it within Dynamo. The UserData.Get node in Dynamo seems to be missing as well.
I eventually want to pass this data into the parameters of some bespoke Revit families.
Welcome to the community! Feel free to Introduce yourself to the community if you want to!
When Speckle sends data to Dynamo, it arrives in the form of a Dynamo dictionary. To access the relevant data in Dynamo, it’s important to check out the structure of the data sent from Rhino via Speckle’s web application and use the provided keys. Don’t worry if you’re not sure how to do this - here’s another thread that shows how to access geometry from Speckle data.
If you’re still finding it tough, don’t hesitate to share your Speckle Model link. We’re always here to help!
Thanks for pointing me in the right direction, could you kindly explain how to access the other information beyond the meshes? I am specifically interested in accessing the “userStrings” - but the dictionary returned to Dynamo does not include this key-value pair.
Thank you for sharing the Speckle model with us. It appears that the received data is missing the userString key. We will investigate this and provide an update as soon as possible. Thanks for bringing this to our attention!
Ok, we just discussed this with @AlanRynne and it’s a bit trickier to support this in Dynamo.
Dynamo does not support metadata in any Geometry classes, hence when converting a Brep→Dynamo or any other geometry for that matter, any userStrings and other metadata that was attached will be lost. Grasshopper has the option to “not convert” objects because it defers conversion to each node, while dynamo converts everything upon receive. This may not be doable, or may require some big changes on how Dynamo connector works to support it.
So in the meantime, I’d recommend you to go with the GH route. Here’s a simple Grasshopper script that extracts the userStrings and stores it in a separate key.