Skip to main content
deleted 11 characters in body
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

Try this instead:

arcpy.AddField_management("wrfd01_layer_intersect","area","DOUBLE","#","#","#","#","NULLABLE","NON_REQUIRED","#")
arcpy.CalculateField_management("wrfd01_layer_intersect","area",expression=""!shape.area@squaremeters!","PYTHON_9.3","#")

I think you need to use a DOUBLE instead of LONG to get the desired area values. I suspect your "no values" are roundings of floating point numbers to an integer value of 0 - but I cannot be sure.

To get the above syntax I used Copy As Python Snippet from a successful run of each tool using its tool dialog.

Try this instead:

arcpy.AddField_management("wrfd01_layer_intersect","area","DOUBLE","#","#","#","#","NULLABLE","NON_REQUIRED","#")
arcpy.CalculateField_management("wrfd01_layer_intersect","area",expression="!shape.area@squaremeters!","PYTHON_9.3","#")

I think you need to use a DOUBLE instead of LONG to get the desired area values. I suspect your "no values" are roundings of floating point numbers to an integer value of 0 - but I cannot be sure.

To get the above syntax I used Copy As Python Snippet from a successful run of each tool using its tool dialog.

Try this instead:

arcpy.AddField_management("wrfd01_layer_intersect","area","DOUBLE","#","#","#","#","NULLABLE","NON_REQUIRED","#")
arcpy.CalculateField_management("wrfd01_layer_intersect","area","!shape.area@squaremeters!","PYTHON_9.3","#")

I think you need to use a DOUBLE instead of LONG to get the desired area values. I suspect your "no values" are roundings of floating point numbers to an integer value of 0 - but I cannot be sure.

To get the above syntax I used Copy As Python Snippet from a successful run of each tool using its tool dialog.

Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

Try this instead:

arcpy.AddField_management("wrfd01_layer_intersect","area","DOUBLE","#","#","#","#","NULLABLE","NON_REQUIRED","#")
arcpy.CalculateField_management("wrfd01_layer_intersect","area",expression="!shape.area@squaremeters!","PYTHON_9.3","#")

I think you need to use a DOUBLE instead of LONG to get the desired area values. I suspect your "no values" are roundings of floating point numbers to an integer value of 0 - but I cannot be sure.

To get the above syntax I used Copy As Python Snippet from a successful run of each tool using its tool dialog.