Output Python code corresponding to any GUI operation

Idea created by mikewinddale on Jun 24, 2020
    Already Offered

    ArcMap and ArcGIS Pro should have the ability to output the Python code corresponding to any GUI operation, with all the fields filled in.


    This would work similarly to a feature which exists in the Stata statistical software package. Whenever a user chooses an operation from the drop-down GUI menu, and fills in the dialogue box options with variable names and other settings, then Stata will output the exact command line equivalent - with every parameter selected in the dialog box being included in the proper place in the code.


    ArcMap and ArcGIS Pro should do this too. This way, even users who are not familiar with Python can still create reproducible script files, simply by performing each operation in the GUI and then saving each Python command in a text file. 


    This would be especially valuable for users who are using output from ArcMap or ArcGIS Pro as an input to another software package. For example, I will often use ArcMap to spatially join data and then output the result as a CSV to import into Stata to perform regressions. 


    Obviously, users who are proficient in Python will not benefit. But this will benefit users who do not know Python, or who are still learning Python. Such users could continue to use the ArcMap or ArcGIS Pro GUI and drop-down menus, and copy-paste the Python code that is produced into a script file.


    I am attaching screenshots of Stata to show how this works in Stata, as an illustration.