HVAC Zone Name to Space

I am trying to push the HVAC Zone Name parameter to all the spaces within the zone so that I can sort the space schedule by HVAC zone. This is a small part of a larger project that I am working on.

Doing a search I uncovered that HVAC Zones don’t work well with the boundaries unless you access the Revit API so I went the other path which was to use the Steam Nodes package and Tools.GetSurroundingElements. I have seen several examples where this worked but I am using Dynamo 2.0.1 and unfortunately, that node is not working.

When I edit the node there were two items deprecated but easily fixed. The larger issue was the python script which had an error stating, "Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 51, in
AttributeError: ‘NoneType’ object has no attribute ‘Min’.

Any ideas on how to fix that error, I am not proficient in python? Also, is there any better way of approaching this? I see some reference to dictionaries but I have never worked with them before.

You can use this method to get spaces from zones.

This was great, thanks for the help!!