In ArcMap, I was able to determine if my users were in an edit session, or no.
I know that an edit session isn't the same / not required in Pro. But many of my users are still new to Pro, so I suggest they follow the instructions in this link, to enable editing from the edit tab.
https://www.youtube.com/watch?v=nQq3sgFbk8I
I have a c# Add-In for ArcGIS pro. I would like my program to be able to determine if my user is in an edit session, or no.
I have tried things like this:
private async void CheckEditSession()
{
// Check if an edit session is in progress
bool editInProgress = false;
await QueuedTask.Run(() =>
{
editInProgress = EditingModule.Current.EditState == EditState.Editing;
});
// Display appropriate message
if (editInProgress)
{
MessageBox.Show("Edit session in progress.");
}
else
{
MessageBox.Show("Edit Session NOT in progress.");
}
}
But, as you can see, this syntax isn't really available. I'm having trouble finding any equivalent in the vast work of Pro Snippets.
How can I programmatically determine whether or not my user is in an edit session, or not?