Enhance the "Geoprocessing History menu"

469
0
12-20-2020 07:52 AM
Status: Open
Labels (1)
MarcSwartz
New Contributor III

The Idea is to add an additional Right click Menu item to the Geoprocessing History menu.  It could be labeled as: Copy Python Command with Env

It would Copy the Python command and open a checkbox selection list of the environment variables to also be copied.  The checkbox list should include top level option like:

  1. Environments use with Geoprocessing tool
  2. Non Default Environment 
  3. All selected Environments

Say we run a geoprocess task that includes a Processing Extent and we use the "Current Display Extent" option.

 
 

MarcSwartz_0-1608479485891.png

 

The Copy Python Command with Env could return the selected Environments Python commands and the Geoprocessing tool's Python command.  (simple example)

arcpy.env.extent = arcpy.Extent(936212.76, 655875.41, 938212.76, 656875.41)

arcpy.cartography.AggregatePoints("InData_11","Outdata_11_AggregatePoint", "10 Feet")

For the way I work, this would be a big time saver and reduce errors.  It would also be a great learning/teaching resource into the arcpy.env world. 

Thanks All.