Work with geoprocessing history

The geoprocessing tools you run are logged and saved with a project. You can view information about each tool that was run and reopen the tool with the same settings you previously used. Use the geoprocessing history to better understand the processes that created the data and layers in a project.

When you run a geoprocessing tool, an entry is added to the Geoprocessing tab Geoprocessing History in the History pane. To access history for geoprocessing tools, on the View ribbon, in the Geoprocessing group, click the History button Geoprocessing History.

History entries

Each history entry includes the following information about the tool:

Manage history

When you open a project at a later time to continue your work, all of the tools you previously ran in the project are available to review in the geoprocessing history. To reopen and run a tool in the history, double-click it, or right-click it and click Open.

You can remove history entries that you do not want to keep in a project. Select the entries you want to remove, right-click and click Remove. Single or multiple selected history entries can also be removed using the Remove button Delete at the top of the history entries list.

History favorites

Tools in a project's geoprocessing history can be marked as a favorite, which pins the tool to the top of the geoprocessing history Favorites section.

Add a tool to history favorites

To add a tool to your favorites, do the following:

  1. Right-click a tool.
  2. Click Add To History Favorites Add To Favorites.

    Tools marked as a favorite are listed in the Favorites section and continue to appear in the main geoprocessing history view according to the selected sorting method.

Remove a tool from history favorites

To remove a tool from your favorites, do the following:

  1. Right-click the tool in the Favorites section.
  2. Choose Remove From History Favorites.

Filter history

You can apply the following filters to geoprocessing history using the Filter menu Filter:

  • Type—Local, Portal
  • Status—In Progress, Completed, Failed
  • Input Layer—A list of the layers used as input by all tools in history

To filter history, follow these steps:

  1. Open the History pane and click the Geoprocessing tab Geoprocessing History.
  2. Click the Filter menu Filter.
  3. Expand the filter type you want to specify.
  4. Check or uncheck the boxes to display or hide tools in the geoprocessing history.

    You can use the Select All toggle button at the top of the Filter menu to check or uncheck all filters. After unchecking all filters, check a specific type, status, or input layer to see the geoprocessing history entries that match the filter criterion.

Automate geoprocessing using history

You can use tools from the Geoprocessing pane as a starting point to automate your work with ModelBuilder or Python. To automate geoprocessing using history, do the following:

  1. Select geoprocessing history entries and drag them onto a ModelBuilder view, or right-click history entries and click Add To Model.

    The tools and the data required to run the tools are added to an open model. If no model is open, a model is created in the project.

  2. Optionally, select multiple history entries and add them to a model to build a connected chain of processes in the model in which the output of one tool is used as input to another tool.

Convert geoprocessing history entries to Python code

To convert geoprocessing history entries to Python code, do the following:

  1. Select a history entry and right-click.
  2. Choose Copy Python Command .

    The geoprocessing tool command is copied as Python code.

    You can also copy Python code to the Python window using the Send To Python window command or by dragging the history entry into the Python window. History items can be saved as a Python script (.py) that contains the selected tools in the history using the Save As Python Script command.

    If any geoprocessing environments were used when the tool was run, you can include the environments in the Python code using the arcpy.EnvManager class.

    Learn more about running geoprocessing tools in Python

Share an analysis

Use the geoprocessing history when sharing an analysis as either a geoprocessing package or a web tool. You must first successfully run and log an analysis in the geoprocessing history before you can share it.

Learn more about sharing analysis

Geoprocessing logging options

The following geoprocessing options control how the tools you run are logged in geoprocessing history, external XML logs, and dataset metadata.

Write geoprocessing operations to the geoprocessing history

This option controls whether the tools you run are added to the current project's geoprocessing history.

  • Checked—Tool runs are logged in the project's geoprocessing history. This is the default.
  • Unchecked—Tool runs are not logged in the geoprocessing history.

Write geoprocessing operations to an XML log file

This option controls whether information about all the geoprocessing tools you run is written to an external log file.

  • Checked—XML log files are created in the %AppData%\Esri\ArcGISPro\ArcToolbox\History directory.
  • Unchecked—XML log files are not created. This is the default.

Write geoprocessing operations to dataset metadata

This options controls whether geoprocessing tool input and output datasets' metadata is updated to include the tool name, parameters, when the tool was run, and other information.

  • Checked—The dataset metadata contains a Geoprocessing history section with logging of the tools used with that dataset. This is the default.
  • Unchecked—Dataset metadata is not updated.
Note:

You can view the Geoprocessing history section of dataset metadata in the FGDC metadata style.

Note:

Your software administrator may provide a default value for the option to write geoprocessing operations to dataset metadata; the administrator may also lock this value. If the setting is locked, a message appears on the Options dialog box. Learn more about geoprocessing history and metadata

Logging section of the Options dialog box for geoprocessing.