A Macro Recorder for Python

3105
5
12-22-2010 09:14 AM
Status: Closed
Labels (1)
Charles_HenryDE_GUILLEBON
Esri Contributor

Like the "macro recorder" of Excel, all your manual actions in ArcMap data view are instantly translated in Python commands.

5 Comments
AmadeaAzerki
I would like the ability to set a "record" operation in ArcPy to capture a series of basic edit operations in ArcMap (not just geoprocessing tools) similar to creating a macro in other software.  This could then be saved and reused in the ArcPy window for another user session and/or incorporated into model or script for later use.
SteveMiller1
Absolutely agree!!  Just as we are able to export a ModelBuilder model to python, it would be great to be able to Record Macro, as MS Office allows, and then export that macro to python/arcPy.
MatthewBrown1
Python is incredibly powerful and arcpy.mapping is incredibly useful, however it requires a user to go and research the commands and syntax they require. This can be daunting for new users and for simple tasks, it is often faster for them to continue using the UI than it is learn to use arcpy.mapping to perform task such as changing the symbology of a layer. It would be a great feature if ArcGIS Desktop/Pro automatically populated the Python Window with these commands when they are performed through the UI. This feature feature could also be implementent as a recordable macro or incorporated into the Task feature of ArcGIS Pro or  in a similar way that Geoprocessing history can be copied as a Python snippet. This feature could also be implemented beyond the scope of arcpy.mapping.
 
AlainaEmmanuel

Was this ever created?

ShaunWalbridge
Status changed to: Closed

The model of automation employed by our desktop applications provides a number of avenues for automation. Some of the methods we provide:
 

  • A collection of tools can be visually diagrammed into a ModelBuilder model, which can in turn be exported to a Python script

  • Any Geoprocessing tool, once executed, can be exported as a Python script or command from the Geoprocessing history.

  • Geoprocessing tools authored in the default ATBX format will generate code representations of themselves automatically, and can be managed in source control like any other source code. Both the ATBX format and Python toolboxes provide a mechanism to create custom Python code from existing tools.

  • ArcGIS Pro supports Python Notebooks as a top-level content type, they can be included in projects and authored alongside any other project components and shared directly with the project or as standalone artifacts.

  • Tasks can be used to automate multi-step processes which require guided input along with the task.

     

We continue to add to Geoprocessing and Python to further enhance the experience of automating the application and both sharing and reproducing your work. Not all aspects of all workflows are possible to automate through these means, but they do serve the vast majority of use cases. Depending on your background, the Python API and the Pro .NET SDK can further extend the ability to automate.

Thank you for your input to the Esri ideas site, we appreciate your time and input.

Cheers,
Shaun