Ungroup a group after changing room base level

I have succeded on changing room base level by grouping them on Dynamo, but whenever I try to ungroup the group, the script fails.

I’ll be really grateful for any tips you can give me.

Take into account I’m using Data|Shapes to select the rooms by their level and set a new base level.

Any updates on this issue? I also create a model group of rooms and change the level but once I ungroup them using clockwork ungroup elements the level changes back to origin. would be greatful for any advice!