Using ArcPy Add-ins, I can issue a message, but I don’t understand how to cancel or undo deleting an object. Is it possible?
class ControlUniq(object): """Implementation for addin1_addin.ControlUniq (Extension)""" def __init__(self): # For performance considerations, please remove all unused methods in this class. self.enabled = True def onDeleteFeature(self): chek=pythonaddins.MessageBox(u"Delete object?",u"Deleting...",1) print chek if chek=="OK": pythonaddins.MessageBox(u"The object was deleted",u"Deleting...") else: ### I don't understand how to undo operation Deleting ### Undo() pass