Select to view content in your preferred language

Copy GP tool parameters as formatted text without running tool

556
3
12-14-2023 07:01 AM
Status: Open
Labels (1)
Bud
by
Honored Contributor

It would be great if we could copy geoprocessing tool parameters to the clipboard (including parameter labels). I'm picturing a copy button right in GP tool forms, similar to Copy the text from "Source" (Layer Properties)

The result would look something like this:

Target Features: MyFGDB\Deficiency_For_Repair
Join Features: MyFGDB\Sidewalk_Lines
Output Feature Class: MyFGDB\Deficiency_For_Repair_INSP_ID
Join Operation: JOIN_ONE_TO_ONE
Keep All Target Features: True
Field Map of Join Features:
    [List of fields]
Match Option: CLOSEST
Search Radius: 10
Units: Metres
Distance Field Name: [empty]

Use case:
Use the text to easily create documentation, logs, or emails about how a GP tool was used or should be used in the future. It needs to be true text, not a screenshot, so that the text is searchable, and so we can copy/paste values into GP tool parameters in the future. It needs to be clean, human-readable text, not Python code.

3 Comments
SteveLynch

After the tool is run, click on View details, change to the Parameters tab and click on the "Copy all details to clipboard" icon.

a.png

 

Bud
by

@SteveLynch Thanks.

I guess the limitation with that technique is that the parameters can only be copied if the tool is run-able. If we can't run the tool due to "pre errors", or don't want to run the tool at this time (save the parameters for later), then there isn't a way to copy the parameters.

Bud_0-1702567643864.png


I suppose Import/export GP tool parameters to file could be an alternative to this idea.

PeterKnoop

@Bud the "Copy Python Command" is another option that partially addresses your need. It gets around the not wanting to run the tool limitation, as you can fill things out and copy without having to run the tool. It does, however, fall victim to pre-errors; if an error is present, then Copy Python Command is grayed out.