Get item level from any item

Very Good days.
I am trying to obtain the level of a set of elements, areas, spaces, walls, generic models, etc.
but it happens that not all of them have the level parameter and I would like to know how I could make a code in python that returns the level object of everything that has a level reference and if it does not have it, it would return the word “does not have a level”

Thank you so much.

@AM3D.BIM.STUDIO ,

sounds like

x == null || x == “” ? “does not have level” : x

:wink:

1 Like