If I add exportToString to the return statement as below:
return arcpy.SpatialReference("WGS 1984 UTM Zone " + utm_zone).exportToString()
and change the data type to coordinate system and run the model within model builder first to return a value value and then connect it to the Project tool it works. It's been a while, but I seem to remember this from when building models in ArcMap. And I found it very annoying.
I am now dealing with an issue where I added variable to the model to use as the output workspace location. I am trying to add inline variables in the output dataset parameter and when I enter it and hit OK it prepends the the default workspace location to my inline variable. I just want the variable. So if I set the parameter to
%Feature Dataset%\%Input Layer%_Projected
after I it OK it changes to
C:\Users\luke\Documents\ArcGIS\Projects\SS\%Feature Dataset%\%Input Layer%_Projected
I don't want C:\Users\luke\Documents\ArcGIS\Projects\SS\ as that is defined in my variable "Feature Dataset"