When writing ArcPy code to use with ArcGIS Desktop 10.x applications like ArcMap I will often run a Geoprocessing tool and then go to the Geoprocessing | Results window to right-click on that successful run to Copy As Python Snippet so that I can Paste that code into my script.

When I look for the same option in ArcGIS Pro there is no Results window to start from.

What is the equivalent workflow for ArcGIS Pro?


1 Answer 1


After running a tool from the Geoprocessing pane, I found that I could right click on the successful run at the bottom (in green) and choose Copy Python command.

enter image description here

Alternatively, I could use ANALYSIS | History to open the Project pane's Geoprocessing History and right-click the successful run there to choose Copy Python command.

enter image description here

Either workflow above places code like that below into the Paste buffer ready to be pasted into a script:

arcpy.management.CreateFishnet(r"C:\Temp\TestProj\TestProj.gdb\TestFishnet", "110 -35", "110 -20", 2, 1, None, None, "150 -20", "NO_LABELS", "DEFAULT", "POLYGON")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.