I was wondering if it is possible to set up a tool in ArcMap so it automatically runs when a change is made to a layer. For example, when a new feature is added to a table, the tool automatically runs. I have some experience with Model Builder but not a lot with Python. Basically I want to autosave my map and then run a tool on the .mxd itself to export it to KML. This may not even be possible but I thought I'd ask here on GeoNet if anyone had any ideas.
Thanks!
It is possible to create a custom tool in ArcMap that "reacts" to edits to the layer using ArcObjects. You would tie into events which get triggered. When these events are caught, your code can be run.
Here is the ESRI documentation that covers events;
I do not know if you can access these events using Python or the Add-In customization.
Thank you for the information. I will check it out.
Out of curiosity, did you ever get around to solving this?
I never figured out how to do it on changes to a layer or map, but did find out how to just have a script run at a prescribed time every day which should basically do the trick. Scheduling a Python script or model to run at a prescribed time | ArcGIS Blog
Cool – if you can script it then it’s not worth diving into ArcObjects! Plus the scripting is much more powerful ever sense the move to Python.
I have started to learn some python, at least for use in ArcGIS. There are a lot of useful resources out there to learn python for ArcGIS and just in general. Thanks!