In the Editing Options of a project, I choose to automatically save edits after 1 minute.
If I create a new feature manually, it is automatically saved after 1 minute. However, if I create the feature programmatically, it is not automatically saved after 1 minute.
To create the feature programmatically, I use a Construction Tool and the following code inside the method OnSketchCompleteAsync():
var createOperation = new EditOperation();
createOperation.Create(featLayer, attributes);
bool succeeded = await QueuedTask.Run(() =>
{
return createOperation.Execute();
});
Is there a way that the creation of my new feature is recognized by automatically save edits?
Solved! Go to Solution.
What version of Pro are you using? I was not able to duplicate this issue using ArcGIS Pro version 3.0.
I used createOperation.ExecuteAsync(); instead of the synchronous Execute method.
This is a bug, I guess. I implemented a workaround to automatically save my edits after 1 minute using System.Windows.Threading.DispatcherTimer
What version of Pro are you using? I was not able to duplicate this issue using ArcGIS Pro version 3.0.
I used createOperation.ExecuteAsync(); instead of the synchronous Execute method.
We are using ArcGIS Pro 2.9.5. I tried it with createOperation.ExecuteAsync() and it worked! Thank you.