I have a polygon shapefile and I want to write a Python script to add a field named "area" and calculate its geometry areas.
The script is like this:
arcpy.AddField_management("wrfd01_layer_intersect","area","LONG","","","","","NON_NULLABLE","NON_REQUIRED")
arcpy.CalculateField_management("wrfd01_layer_intersect","area","!shape.area@squaremeters!")
When I run it the field adds, and you can see the process of calculating the geometry area.
However, in the attribute table, there are no values in the field "area".
How to solve this problem?