Get EditOperation from undo stack?

1174
4
09-02-2016 07:07 AM
Highlighted
New Contributor

Hello everybody,

The general behavior of the Add-In which I develop is to edit a Row with ArcGIS Pro, and after Pro finished its operations, the Add-In performs some more. I chain the Add-In EditOperations, which works great. But as a result, there are of course two operations in the undo stack. One from Pro itself, and one from the Add-In.

So I’m wondering whether it is possible to get the original EditOperation from Pro (obtained for instance by its unique GUID, which is provided by RowChangedEventArgs) and chain the Add-In operations to it.

I’ve already found the FindRedoOperations/FindUndoOperations methods exposed by OperationManager, but I’m not sure whether this could be the solution.

Thanks in advance,

Michael

Reply
0 Kudos
4 Replies
Highlighted
Esri Regular Contributor

Hi Michael,

Its currently not possible to combine an edit operation with existing operations on the stack, nor is it possible to combine an edit operation with your own operations through the CreateCompositeOperation method.

Highlighted
New Contributor

Hi Sean,

Thanks for your reply.

Do you know whether it will be possible to combine edit operations with existing operations on the stack in future SDK versions?

Reply
0 Kudos
Highlighted
Esri Regular Contributor

Michael,

Its possible. We looked at it during development and placed it on hold after a few issues came up. For example, if you combine an edit operation with a mapping one, what happens when you discard or save edits? Currently we remove all the editing operations from the stacks.

What sorts of operations are you looking to combine?

Reply
0 Kudos
Highlighted
New Contributor

Hi Sean,

I’m looking to combine an edit operation (which is already combined with multiple edit operations – exclusively edit operations) from my add-in, and the latest operation from pro, which should be an edit operation too, since the add-in reacts immediately on RowChanged-, RowCreated-, and RowDeletedEvents respectively on the EditCompletedEvent.

Reply
0 Kudos