Read nested custom object properties from Speckle in C#

I’m trying to read some custom object properties from Speckle in C#, the screenshot is below. The issue is when I flatten the stream, I can’t find the base objects with the same ID as in the Speckle stream.

Do you have an example how you’re searching for the id ?

Hi @haitheredavid, I’ve got a bit closer with beamElements below, I get an object with four Speckle base objects inside, which is what I was expecting from the first group in the original. But the ids aren’t the same and it doesn’t seem to contain the custom properties when I use GetMembers()

Hey @imanwarsame ,

Sorry it took us a bit to reply!

When using .Flatten() the function is flattening every Base object in the commit and the first result might not be exactly the object you’re looking for.
I’d suggest trying to iterate through them or filtering by id directly, something like:

For a more advanced usage you can look at creating a custom traversal function, see


Hi @teocomi, worked like a treat! Thanks for pointing me in the right direction.
For completeness the below is how I managed to get all the base objects with custom properties, not the neatest but it works!
Members = FlatData.FindAll(i => i.GetMembers().Keys.Contains("@MemberType")).ToList();