O'Reilly logo

Programming ArcGIS 10.1 with Python Cookbook by Eric Pimpler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Inserting rows with InsertCursor

You can insert a row into a table or feature class using an InsertCursor object. If you want to insert attribute values along with the new row, you'll need to supply the values in the order found in the attribute table.

Getting ready

The InsertCursor() function is used to create an InsertCursor object that allows you to programmatically add new records to feature classes and tables. The insertRow() method on the InsertCursor object adds the row. A row, in the form of a list or tuple, is passed into the insertRow() method. The values in the list must correspond to the field values defined when the InsertCursor object was created. Just as with the other types of cursors, you can also limit the field names returned ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required