Select to view content in your preferred language

Edit Operation Not Enabling Undo in ArcGIS Pro

107
4
Jump to solution
Tuesday
EdwardBlair
Frequent Contributor

All -

I've been trying to find my problem for days and am stuck.   The attached snippet has code that updates feature attributes inside an Edit Operation.   When executed the updates are applied as expected, but the ArcGIS Pro "Undo" does not become enabled.

The crux of the code is below.   The code is attached.

Any suggestions would be GREATLY appreciated.

Thx,

Ed

---------------------------------------------------------

EditOperation editOperation = new EditOperation() { Name = "Roll Phases" };
editOperation.Callback(context =>
{

// update stuff

}, listOfFeatureClasses);

try
{
bool creationResult = await editOperation.ExecuteAsync();

}

catch (GeodatabaseException geoex)
{}

 

 

 

0 Kudos
1 Solution

Accepted Solutions
GKmieliauskas
Esri Regular Contributor

Hi,

Take a look to that thread. It is related to dockpane and undo.

View solution in original post

4 Replies
EdwardBlair
Frequent Contributor

All -

The code above is being executed from an ArcPro DockPanel.

I realized I have similar code -- that works -- which is being executed from an Pro Window.   So... I took the code from the DockPanel and implemented within a new Pro Window.   And it works!   The data updates are made and the Undo button is enabled.

If anyone has a clue on why this is the case, I would really like to understand what is going on.

Thanks,

Ed

0 Kudos
EdwardBlair
Frequent Contributor

I should have further explained that the DockPane implementation follows the MVVM pattern -- as seems to be recommended.   The logic in the Pro Window is defined in the code behind.

Ed

0 Kudos
GKmieliauskas
Esri Regular Contributor

Hi,

Take a look to that thread. It is related to dockpane and undo.

EdwardBlair
Frequent Contributor

Boom!  Just like that..  it works.

Thanks,

Ed

0 Kudos