Select to view content in your preferred language

Insert Cursor Documentation Question

1089
1
Jump to solution
07-02-2021 09:12 AM
Kbperri
Emerging Contributor

The API reference guide states, "When used in an ArcGIS Pro add-in, insert cursors should be used within an edit operation callback. For stand-alone CoreHost applications, insert cursor usage should be enclosed within a call to Geodatabase.ApplyEdits." My question is, what is the reasoning behind this? What would happen if Geodatabase.ApplyEdits was used within an add-in?

0 Kudos
1 Solution

Accepted Solutions
RichRuh
Esri Regular Contributor

This really has nothing to do with Insert Cursors.

All editing inside an ArcGIS Pro add-in should use edit operations, either directly or with an edit operation callback.  If you use Geodatabase.ApplyEdits, the map is not refreshed and the operation stack (undo/redo) is unaware of your edits.

I hope this helps.

--Rich

View solution in original post

1 Reply
RichRuh
Esri Regular Contributor

This really has nothing to do with Insert Cursors.

All editing inside an ArcGIS Pro add-in should use edit operations, either directly or with an edit operation callback.  If you use Geodatabase.ApplyEdits, the map is not refreshed and the operation stack (undo/redo) is unaware of your edits.

I hope this helps.

--Rich