AnsweredAssumed Answered

Execute Built-In Command in ArcMap using Python Add-Ins Extension Event?

Question asked by james.anderson on Feb 12, 2016
Latest reply on Feb 12, 2016 by jamesfreddyc

Hi ESRI Geonet,


The following is a re-post of my gis stack exchange question bearing the same title. Any help or suggestion here is greatly appreciated.


Is it possible to execute an ArcMap built-in command programmatically, using the Python Add-ins framework?


Can ArcMap built-in commands be exposed to and executed using the event methods found in the Python Add-ins Extension class? For example, I would like to open the attribute editing window upon triggering the onCreateFeature(self) method of my Extension class. Is it possible to automate window/menu opening using this approach?


Backstory: I am constructing a Python Add-in for ArcMap 10.3. According to this ESRI blog post, ArcMap’s built-in commands and tools (not referring to the geoprocessing tools, but to interactive tools like trace) can be added to Python Add-in toolbars, by referencing their respective GUIDs in the config.xml file associated with the Python Add-in project. Unfortunately from what I have found so far, tools/commands added this way do not appear to be exposed to the rest of the Python Add-ins framework at this time.


Am I approaching this problem the wrong way?


Thanks so much!