UpdateCursor method |
|
Release 9.3
Last modified January 19, 2010 |
![]() ![]() ![]() Print all topics in : "Properties and Methods" |
Note:
This topic was updated for 9.3.1.
Used to positionally update and delete rows in the specified table
Part | Description |
object | The instantiated geoprocessor object. |
InputValue | The table, feature class, or shapefile containing rows to be searched. |
WhereClause | Optional. An expression that limits the number of rows to be searched. For further information on WHERE clauses and Structured Query Language (SQL) statements, see About building an SQL statement. |
SpatialReference | Optional. The spatial reference of the input table, feature class, or shapefile. |
FieldList | Optional. Fields to be included in the cursor. By default, all fields are used. |
SortFields | Optional. Fields used to sort the rows. Ascending and descending order for each field is denoted by A and D. |
import arcgisscripting gp = arcgisscripting.create(9.3) # Create update cursor for feature class # rows = gp.UpdateCursor("D:/St_Johns/data.mdb/roads") row = rows.Next() # Update the field used in buffer so the distance is based on the road # type. Road type is either 1, 2, 3 or 4. Distance is in meters. # while row: row.buffer_distance = row.road_type * 100 rows.UpdateRow(row) row = rows.Next() # Delete cursor and row objects to remove locks on the data # del row del rows