I have written a Python add-in extension for ArcMap 10.6, I want it to automatically update some attributes after a feature is edited or created. My test code looks like this:
def onStopOperation(self):
print("%d onStopOperation(self)" % self.count)
self.count += 1
print("Workspace ", self.editWorkspace)
print("Selected ", self.editSelection)
print("currentLayer", self.currentLayer)
obj = pythonaddins.GetSelectedTOCLayerOrDataFrame()
print("current toc", obj)
My add-in catches ALL available events, and it looks like currentLayer is set to None everywhere not just in onStopOperation.
This is typical output
16 onStopOperation(self)
Workspace C:\GeoModel\Clatsop\WorkFolder\ORMAP_Clatsop.gdb
Selected [32183]
currentLayer None
current thing Taxlot