I have a problem with turning on or off ArcMap editor, using arcpy.
When I try to turn on editor on arcpy I use this code on ArcMap Python window
workspace = r'C:\tests\test.mdb'
edit = arcpy.da.Editor(workspace)
edit.startEditing()
edit.startOperation()
But it doesn't activate editor. When I do this process with using Editor - Start Editing on Arcmap, I try to test it with this code :
workspace = r'C:\tests\test.mdb'
edit = arcpy.da.Editor(workspace)
xa = edit.isEditing()
print xa
It returns False, Although editing is on.
I need to deactivate editor in my Python add-in script. So, i have to use arcpy.
1 Answer 1
This is not possible with arcpy.da.Editor. Actually, the only way to control edit session is to use ArcObjects (IEditor Interface). It is possible to do with Python using Comtypes (Accessing Arcobjects From Python)
Explore related questions
See similar questions with these tags.