5

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?

asked Feb 9, 2017 at 6:42
0

1 Answer 1

8

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")
answered Feb 9, 2017 at 6:46

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.