SpeckleAbstract object conversion error

Hi all,

I’m having problemens when I try to deserialize speckle abstract objects in GH. I want to have a root SpeckleAbstract object which can have child SpeckleAbstract objects or parameters. This nested data structure reflects the data I use in my web application. I created a small example which results in the same error I encountered.

Is there a way to deserialize (nested) SpeckleAbstract objects in grasshopper?

Hi @robinvdhave! I think you’re using abstract objects wrong :slight_smile: They’re meant to be wrappers around other classes coming from foreigh dlls.

So unless you want your web-app generated objects to natively deserialise in grasshopper to a specific type that’s somewhere in a different assembly (which should be loaded in gh first), you don’t need abstracts!

Here’s an example of a nested structure that works just fine:

speckle1.0.nested.objs.gh (9.1 KB)

Hi @dimitrie, Good to know I can just use SpeckleObjects instead of SpeckleAbstracts. In your example the nested object is set as a dictionairy. I want to nest a SpeckleObject with properties as for example _type and name. When I do that I again get a conversion error. Is there a way to nest SpeckleObjects? Other solution would be to add the object properties as _type and name to the dictionairy, but then they show up in the node when I expand the dictionairy. This is information which is not needed for the user. It is only needed for the serialization to the objects of the web-app.


speckle1.0.nested.objs.gh (9.2 KB)