Tips for creating geoprocessing packages

Before you begin packaging

When you create a package, ArcGIS analyzes the result for problems. Based on this analysis, you may have to provide additional information and, in some cases, rerun your result to create output data. There are three things you can do before you package that will minimize problems.

Document the tool

When packaging a result based on a custom model or script tool, your custom tool needs to be documented (system tools are already documented; it's only custom tools that need documentation). When packaging, ArcGIS analyzes your tool for a minimal level of documentation; your tool must have at least a summary, one or more tags, and a description for each parameter. The level of documentation you provide is up to you. If you're sharing your tool with a colleague in your workplace, then minimal documentation may be acceptable, since you're available to answer your colleague's questions. But if you're loading your package onto ArcGIS Online, you want good documentation so that your package can be used and understood by a wide audience.

When you're packaging your result, ArcGIS checks for the minimal level of documentation, and if it's not present, you can pause the packaging process and write your documentation. This isn't a good practice; you are usually in a hurry to complete the package, and your documentation reflects this. It is better to take your time and provide good tool documentation before you create your final package.

To document your custom model or script tool:

  1. In ArcMap, browse to your tool that created the result in either the Catalog window or the ArcToolbox window. Right-click the tool and select Item Description. In ArcMap, browse to your tool that created the result and select it in the tree view, then click the Description tab.
  2. In the Item Description window, click the Edit button Edit Metadata.
  3. In the Tags text input box, provide tags. Tags are used by search engines.
  4. In the Summary (Abstract) input box, provide a short and concise summary of your tool. Note that a package can contain additional files, such as Word or PDF documents, where you can provide more detailed documentation. This summary is also used by search engines.
  5. In the Syntax section, expand each parameter and make sure the Dialog Explanation is populated. If it is empty, add appropriate text.
  6. When you're satisfied with your documentation, click the Save button Save Metadata Edits.

Tags, summary, and syntax are the minimum requirements for packaging. You should, of course, go beyond the minimum requirement and provide usage notes, code samples, images, credits, use limitations, and a scale range for your tool.

Additionally, for custom model tools, you can add labels to your models within ModelBuilder. For custom script tools, meaningful comments in your Python code are welcomed by anyone reading (or debugging) your code.

Learn more about documenting tools

Write package documentation

In addition to documentation for the tool that created the result, you'll need to provide documentation for your package. This is done during the packaging process. A good idea is to write a description of your package using your favorite text editor prior to making the package, then copy and paste this text into the package description.

NoteNote:

When packaging, ArcGIS uses the summary and tags from your tool as the initial package documentation. If your package contains more than one tool, only the summary and tags from the first tool are automatically added. In this case, you should edit the package's summary and tags with information that describes all the tools in your package.

Recreate the result

Results are created by running a tool, and you need a valid result before you can create a package. When packaging, ArcGIS analyzes your result and copies all input and output data to the package. If this data cannot be found, you'll receive errors, and you'll have to correct them before you can continue packaging.

NoteNote:

The most common problem with data not being found during packaging is that you're packaging a stale result. A stale result is typically a result found in the Previous Session node in the Results window. Between the time the result was created and the time you packaged the result, your data has either been deleted, moved, or renamed, and cannot be found.

To rerun a result, right-click the result and choose either Open or Re Run. Rerunning ensures that all input and output data can be found. You can then package the new result.

Using the Package Result and Share Package tools

You can create a geoprocessing package with the Package Result tool. Once your geoprocessing package is created, you can share it on ArcGIS Online using the Share Package tool.

Sharing invalid results

NoteNote:

There are times when you may want to share an invalid result with a colleague for troubleshooting. You can share an invalid result by using the Consolidate Result tool, as follows.

  1. Open the Consolidate Result tool.
  2. Drag the invalid result from the Results window into the Result parameter.
  3. Provide a value for the Output Folder parameter.
  4. Change any of the optional parameters or use their default values.
  5. Click OK to run the tool.
  6. In Windows Explorer, browse to the location of the output folder.
  7. Use the ZIP compression utility to compress the folder into a .zip file.
  8. E-mail the .zip file to your colleague. They can unzip the file and examine all aspects of your tool.
1/27/2015