import arcpy def UpdateField(value): # Create update cursor for your feature class # Update the correct path to your feature layer rows = arcpy.UpdateCursor(r"C:\Temp\test.gdb\Property_Layer") # Update/calculate field to the variable "value" for row in rows: # Update "LOCALITY" Field row.LOCALITY= value rows.updateRow(row) # Delete cursor and row objects to remove locks on the data del row del rows
value = "CAT" rows = arcpy.UpdateCursor ("Property_Layer","LOCALITY = '' OR LOCALITY IS NULL") #blank string or Nulls for row in rows: row.setValue("LOCALITY", value) #assuming this is a text field rows.updateRow(row) del row, rows
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.