Recieving Geometry in Grasshopper - I want parent layer not the child layer

Hello,

I am passing up some geometry from Rhino and want to access this in Grasshopper.

All my Layers sit within a parent Layer, titled ‘3D_LCA’.

When I recieve this in grasshopper, rather than Speckle breaking down all the child layers for me, i just want it to give me the parent layers. eg. ‘3D_LCA’. I then want to be able to explore all the child layers within this, as I dont always know how many child laters I will have.

I know if I actually pass all the items, up as a block, I can do this, as I will recieve the block rather than the layers, but ideally I dont want to have to make this a block before.

I recall many months ago, I could do this in python by using: .GetDynamicMembers();


Save 02
Save 3

Hi @ssw

You need to deactivate Expand received object on the Receive component context-menu.

Although, not sure this would do the exact thing you’re expecting, once you’ve got the “non expanded object” you can get the keys and then fetch the values of the ones you need.

Thankyou,

When I do that, it works, but as soon as I pass it into the DSO I get back to where I was. I just want a flattened list essentially of speckle objects, because if I had 100 layers, I would then need to deal with all of these seperatley and i dont want to put i a single dso node rather than 100 dao nodes for each output.

The next step i have is i just have say 200 speckle objects where i can then find the host layer. This leads to my last issue- because the first dso gives the layer- how do i actually extract the layer name (beside it just showing in the node).

Try Speckle Flatten Collection node, which gives you quick access to all layers and then you can get any layer you need with Speckle Object Value by Key.

Hi @Pavol

Thankyou, and a very good reminder to update my connector.

I run into this issue, where I recieve an object not a collection, throwing an error at the flattener.

Please try to use the updated Connectors - you may need to send the data again.

1 Like

Ah yes, resent it after updating the Rhino collector as advised. Thankyou, this is a really good update!