Is it possible to have "Start Editing" checkbox in python geoprocessing tool like some tools provide such as 'Calculate Field'? What I really want is to edit input data and allow user to visualise the modifications before saving or discarding them.python geoprocessing arcgispro 2.1
What types of edits are being do that aren't in the editing toolbox?
Any other calculations or related functions should be done in newly added fields, or being saved to new featureclasses to avoid the multitude of problems that could arise with a failed 'undo'.
Fields and featureclasses are easy to delete. You could even provide access to them in your toolbox
Sorry, I am missing the point then as to why you would be using anything other than a conventional edit session for such purposes since you can abandon changes there.
In Arcgis Pro, I don't think there is no way to explicitly start or stop an edit session. The custom geoprocessing tool I am developing performs some complex calculation to workout the adjustments that will be applied to the geometry. Within this tool I use arcpy.da.Editor object to start an edit session. But at the end of the modifications I only have option to stop editing with True(save changes) or False(discard changes). So when tool exits edits are either saved or discarded not allowing user to visualise changes beforehand.
I don't see any 'map refresh' capabilities in arcpy or the toolbox editor tools that emulate what happens in an edit session... which you correctly point out... pro is always in an edit state
Its actually Automatic Edit Sessions. Pro start edit session automatically when you start editing a feature and stops it when you click 'Save' or 'Discard', but unfortunately its not applicable for custom geoprocessing tools.