Hi, Jacob, that was fast, thank you!
What you are proposing will work in a case like the previous post. However, boundaries might also look that way:
I still don’t know how people manage to draw boundaries like that, but apparantely, they do. So a more general approach might be needed
edit: I was just thinking… since Revit somehow creates the Area with the right boundary in any case, there might be some magic method in the API doing this, that I am not aware of. Like Rooms for instance, they would not be generated within problematic or not properly enclosed contours, while Areas would