Traceback (most recent call last): File "D:\CubeAlbuquerque\AlbuquerqueNewTAZ\02_Applications\02_Transit_walk_Acc ess\ptaccess_SM.py", line 55, in <module> arcpy.CalculateField_management("TAZ_un_Buffer_Dissolve.shp", "totalArea","[ shape.area]", "VB", "") File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\management.py", li ne 3128, in CalculateField raise e arcgisscripting.ExecuteError: ERROR 999999: Error executing function. Failed to execute (CalculateField).
Solved! Go to Solution.
I couldn't get it working with VB, but here is a valid python expression
arcpy.CalculateField_management("us_eco_l4_no_st selection", "Test" , "!shape.area!", "PYTHON")
arcpy.CalculateField_management("TAZ_un_Buffer_Dissolve.shp","TotalArea","!Shape.area!","PYTHON","#")
Hello Daniel,
I don't think you can calculate area with VB. It might be better to use Python and try to figure out why it's crashing (what error are you getting?).
I would use something like:arcpy.CalculateField_management("TAZ_un_Buffer_Dissolve.shp","TotalArea","!Shape.area!","PYTHON","#")
Also, one quick question, the field "TotalArea" exists before you calculate field right?
I was thinking the same thing, I'd rather know why my code is not working then try to find a run around for it. Also, make sure the field names match up, it is case sensitive.
What is your datasource (e.g. sde feature class, file gdb feature class, personal gdb feature class, shapefile)?
What is your version of ArcGIS Desktop?
What is your operating system?
I was thinking the same thing, I'd rather know why my code is not working then try to find a run around for it. Also, make sure the field names match up, it is case sensitive.