A Quiet Save Edits Command in Tasks

310
1
06-19-2023 10:15 AM
Status: Open
Labels (1)
Joshua_Petitmermet
New Contributor II

I have a set of tasks I use for guiding folks with a very wide range of skill levels through a series of quarterly update processes in Pro. The single biggest pain point is saving edits. If users make edits early in the task and do not save them, it will lead to bad data and errors later in the process. I can call the Save Edits command as a task step, but if there are no pending edits when the call is made (which happens ~50% of the time) the command generates an error and convinces the same new / low expertise users that perennially fail to save their edits that the whole thing broke.

So, what I would like to propose is either:

  1. A Save Edits command that can fail silently if no edits are pending, thereby allowing me to call it in a hidden and auto-proceeding step. Or, even better
  2. The ability to call the Save Edits command via arcpy, allowing me to wrap it in a try/except to suppress the error message when I want to without changing the existing functionality of the command itself.

Worth noting: I have mucked around with trying to hard-force a save with a stopEditing call and so far as I can tell it is not a feasible solution.

1 Comment
Michele_Hosking

Yes please!  I've needed this for ages.  We have been getting around it by putting a message in the task saying to please save before running.  This particular task runs a python script and I think it did run anyway even without saving up until my recent upgrade to 3.1.3.  Now it the script fails every time if edits aren't saved so a way to ensure the data is saved would be brilliant.

I have also tried to put a hidden save in as part of the tasks but got the same result as Joshua above.

 

Just had another thought - in task steps under Actions there are the 'When starting the step' and 'When exiting the step' actions.  Could Save Edits not be options here?

Michele_Hosking_0-1696377813416.png