I have a set of floors that are beeing generated from a file that I have created. However, so far the highest floor had to become the roof manually. I would like to develop a gh snippet which automatically checks the floors by their height, takes the one at the top and changes its layer.
Do you guys have an idea on how to do that? I fear this must be done in Python
Here is a solution purely based on Elefront (no C#, no Python)
As long as the GH is opened, any surface add/deletion/move will be taken into account and the highest floor automatically moved to roof layer, the others to floors layer. No bake needed.
I checked out all your solutions. They all seem to work quite well. I also found an additional solution prior to baking the floors in the first place. So the problem is solved :). Now they get sorted and after that baked for the first time.