Attaching user dictionary to speckle object

Hi all,

I’m having some trouble adding user data to an existing speckle object in grasshopper:

I would expect the “Create Custom User Data” and “Set User Data Speckle Object” to be the correct nodes for this but it seems that is not the case.
Does any of you know what I’m doing wrong?

I managed to get rid of the error messages by using the “create custom Speckle object” and “set Speckle object user data” node:

The extract user data node shows that the user data has not been added to the new Speckle object but has actually overwritten it.
This is fine, however, in the online Speckle viewer the Speckle object is shown with all of it’s old parameters and not the testParam.

Is it even possible to change the properties of an existing Speckle object?

Thanks in advance, any help with the problem would be greatly appreciated.

Hey Daan,

I think the problem could be that the current update mechanism doesn’t realise the objects have changed when just the properties have updated (due to an issue in hashing). And therefore the sender is not sending the objects with the new properties. @dimitrie correct me if I’m wrong.
As possible workarounds for now:

  • try sending to a new stream
  • try creating a new beam from the one you’ve received

Sorry, I know either is far from ideal!

Hi Matteo,

Thanks for the reply and the suggestions.
This is already a new stream I’m sending it to, so I’ll try to find an easy way to duplicate the speckle objects and create new stream with those.


Hi @Daan,

Just a quick note that the first issue you ran into is related to this:

Of course, this might not have any effect on the second issue you’ve run into… :frowning:

Hi all,

Good news! I figured out a nice workaround to solve the problem:

By deserializing the speckle object, adding user data to the Rhino object and serializing it back again, the data has been successfully added as a parameter.
I think it might be a good addition to the Speckle docs to add this workflow in this section:

I’d be willing to add this to the docs myself if that is possible/desirable.


Hi @Daan - even more good news: this was bothering me, so I submitted a fix to the original issue last night:

Matteo merged it into the main branch, so with the next release, you will be able to add user data directly to SpeckleObjects without deserializing.

@daviddekoning Noice, even better!

Sweet, thanks @Daan! Feel free to pop that into the docs: