Element geometry changes list structure

Does anyone knows why this is happening? How do you work around this?

Flatten with amount didn’t solve my problem at all.


Stupid, but it worked.

A Revit element may contain more than one piece of geometry, that’s why the node returns a list for each element, leading to an extra layer of nesting. The example below shows a wall (one piece of geometry) and a window (in this case, three pieces of geometry).

As you showed in your last image, you can Flatten at the desired level and (as long as you are confident that your elements are only returning one element at a time) it will match your original structure

image

1 Like