A structure for sharing tools

As described in Methods for distributing tools, you share tools by first creating a folder containing all the resources your tools use. After manually consolidating your resources into this folder you use the standard ZIP compression utility to create a single .zip file of the folder. You then share the .zip file with others.

This topic describes a folder structure you can use for storing your toolbox and all the resources your tool needs. For the purposes of discussion, and to have an unambiguous name, this folder structure is called the ToolShare folder. You're not required in any way to use this structure; it's simply meant to provide a reference point.

In the illustration below, <ToolShare> is a system folder anywhere on your system. The folder can have any name (the angle brackets <> denote that the text is to be replaced).

Toolshare folder structure

Below is an illustration of a completed ToolShare folder.

An example of a complete ToolShare folder

<Toolbox>

This is a geoprocessing toolbox or toolboxes (.tbx) containing the tools you want to share.

Optionally, your toolboxes could be placed in a geodatabase in the ToolData directory (the ToolData directory is meant to contain data needed for your tools and can contain personal and file geodatabases). However, a toolbox in the <ToolShare> folder is easier to find and makes it obvious that the content of the <ToolShare> folder is to support geoprocessing tools.

<ArcMap mxd>

If you want to deliver one or more ArcMap, ArcScene, or ArcGlobe documents, they should be placed directly below <ToolShare>.

Store relative pathname check box

Alternatively, you can use the Consolidate Map tool to gather together all the resources your map document requires.

Readme.txt

It is common practice to include a Readme.txt file when delivering a folder to someone else. Readme.txt is a text file that you can create with Notepad. If you use a word processor, such as Word, be sure to save the document as simple text.

The audience of a Readme.txt file could include someone that stumbles across the directory and is not necessarily an ArcGIS user. So, it should contain text similar to:

This folder and subfolders contain data for ArcGIS geoprocessing tools. For a description of the tools, start ArcCatalog, right-click the toolbox, then click Help.

You should also consider providing more information, such as a brief purpose statement, date, and contact information.

ToolData

The ToolData directory is meant to contain small datasets, ArcSDE Connection files (.sde) and .lyr files that your tools need to run. Examples include simple lookup tables, such as a table of soil types and their porosity index, or a table of speed limits by Census Feature Classification Code (CFCC). This directory is not meant to contain large datasets, such as soil type polygons for a region. Such large datasets typically reside in a central location, such as an enterprise database or shared directory, and can be accessed using a UNC path or by using a database connection.

Scripts

This folder contains all scripts used by script tools, including any script libraries. Dynamic link libraries (.dll) and executables can go here as well. Alternatively, you can embed your script into your toolbox to avoid having to manage your script files.

Learn more about embedding scripts

Doc

This folder contains anything that helps the user understand the delivered tools, such as

Scratch

This directory can be used for writing intermediate data in models and scratch data in scripts. It contains a file geodatabase named scratch.

Related Topics


Published 6/7/2010