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.
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.
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")