# Create update cursor for feature class. rows = gp.UpdateCursor(table) row = rows.Next() while row: # Add User_Address to field Address row.Address = User_Address # Execute the new value to the table rows.UpdateRow(row) # Go to the next row = rows.Next() del rows
My other issue is when using the geocode address tool it creates an output fc and I'm not sure how to allow overwriting for the feature everytime the tool is used.
import arcgisscripting gp = arcgisscripting.create(9.3) # Setting OverWriteOutput to True allows geoprocessing tools to overwrite # the output if it already exists. gp.OverWriteOutput = 1 gp.Workspace = "H:/Tongass/forestry.mdb" gp.Erase_analysis("housing", "income", "low_income")
import arcgisscripting, sys, os gp = arcgisscripting.create() gp.workspace = os.getcwd() # Get input from the user at the command line. input = raw_input("\nWhat is your address?\n") # Set the output table table = "poll.gdb/Voters" # Call the InsertCursor method cur = gp.InsertCursor(table) # Create the row row = cur.NewRow() # Add input to field 'Address' row.Address = input print "Updating "+table+" with '"+input+"'..." # Insert the row cur.InsertRow(row) # Delete cursor del cur
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.