Assuming I have two SDEs or other datasources with the same datamodel. One contains features the other one is empty. In ArcMap I have layers from both datasources in my table of contents. Now I would like to copy some features that are already selected in the map view from one sde to the other using C# and ArcObjects. What would be the best way to do this?
[GIS] How to copy selected features from one sde to another using ArcObjects
arcobjectsccopyenterprise-geodatabaseesri-geodatabase
Best Answer
Assuming that your features are non-complex, you will want to use an Insert Cursor (method 1). If your features are complex, you must use IFeature.Store() (method 2).
See the following code from this link (It's in VBA, but shouldn't take long to translate over)
Method 1: an insert cursor
Method 2: CreateFeature/Store
Opening the feature class: