When creating a feature the EditOperation.Create method allows you to specify callback to get the generated ObjectId for the newly created feature. Unfortunately, the operations like EditOperation.Duplicate and EditOperation.Split do not allow you to supply a callback to get the created ObjectId. This makes it hard to chain an operation that performs edits involving the newly-created feature.
What is the best way to get the ObjectId from a Split or Duplicate in order to perform a chained operation?
I implemented this using the RowCreatedEvent but this isn't ideal because I can't know for sure if a given row created event corresponds to the edit operation that interests me. I looked at the internal Operation property on the RowCreatedEventArgs but it isn't the same as my original operation.
I ran across this issue when implementing a rather convoluted edit operation:
Best way, I believe, is to use an edit operation callback. Something along the lines of
var op = new EditOperation();
var fc = Layer.GetFeatureClass();
var buffer = fc.CreateRowBuffer();
var f = fc.CreateRow(buffer);
var id = f.GetObjectID();