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?
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
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.