Dynamo - Extracting user data

Hi there!

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.

Any help would be appreciated! :pray:

Hey @Krishna_Duddumpudi ,

Welcome to the community! Feel free to Introduce yourself :person_gesturing_ok: to the community if you want to! :grinning:

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!

Hi @gokermu,

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.

Here is my speckle link: Speckle

Thank you! :pray:

1 Like

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!

Thanks @gokermu,

Is there a work-around for making a call in Dynamo using the API in the meantime? Having access to the userStrings would save me (and my team) a lot of time :slight_smile:

1 Like

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.

UserStringExtractionGH.gh (8.3 KB)

I hope this helps.

https://speckle.xyz/streams/77e23c3edf/commits/db84f3208c

Thanks for the GH workaround @gokermu & @AlanRynne!!

Got it working!

3 Likes