Calculating areas with CalculateField_management

Discussion created by BrianAmos on May 13, 2011
Latest reply on May 15, 2011 by kimo
I'm running this line of code:

arcpy.CalculateField_management("checkhull", "hullarea", "float(!shape.area@acres!)", "PYTHON")

However, checking the attribute table, it's returning square decimal degrees instead. No matter what I change the @acres portion to (@squaremiles, @squarefeet), it returns the same result. If I change the @acres portion to something not on the list of allowed units, though (say, @asdfasdf), it returns an "invalid property" error.

If I go to the attribute table and start an editing session, the "Calculate Geometry" function works properly. I tested it further by going to the Field Calculator and entering !shape.area@acres!, along with a few other types of units, but it's still returning square decimal degrees.

Any ideas of what might be going on? Is there a module I need to import to make this work properly (other than arcpy)?