import arcgisscripting
gp = arcgisscripting.create()
# 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()
转载于:https://www.cnblogs.com/yanleigis/archive/2010/01/04/1639022.html