I wrote a measure to switch selected zones from central systems to single-zone system. The central system can have water coils, both cooling and heating, and therefore could be attached to a chiller and/or boiler loop. The chiller loop can be connected to a condenser water loop.
Basically, after switching the selected zone to another system, those zones are no longer and their previous system. What I'd like to do is to clean up unused Loops after that. My idea is: - loop on AirLoops, delete all those don't have any zones anymore but before that check if connected to boiler and/or chiller loops and store those - Loop on associated chiller loops and if demand components are linked to no air loop, delete chiller loop, but before deletion check if chiller is connected to a condenser water loop and store it - Loop on associated condenser water loops and if not linked to any other demand component, delete it - Do something similar to associated hot water loops.
I'm in the middle of writing this cleanup routine, and it's proving pretty time consuming.
Considering this seems like a legitimate and, I think, quite often useful routine, I think there are good chances somebody better at Ruby/OS Measures has already written it, but I haven't found it yet.
Does anybody know if that's already been done, so I don't have to reinvent the wheel?