Methods for distributing tools


There are three basic methods for sharing your tools. All three methods start with the idea that you gather together your toolboxes and tool data into one well-organized system folder, the ToolShare folder.

The illustrations below show the ToolShare structure. Details can be found in A structure for sharing tools. The content of the ToolShare folder is just a suggestion—nothing other than a toolbox is required.

Example of a system folder with tools

Here's an alternative view the ToolShare structure:

Recommended directory structure

The three basic methods are:

  1. Package and ship.
  2. You either e-mail your ToolShare folder to your users, allow them to copy your ToolShare folder to their computer, or use traditional mail. If you're e-mailing, you typically use the WinZip compression utility to create a .zip file of the ToolShare folder, which is why this technique is also known as zip and ship.

  3. Share on a local area network (LAN).
  4. You share your ToolShare folder so that other users on your LAN can access it. In this case, your user connects to your ToolShare folder, adds your toolbox to ArcToolbox, and runs your tools. They do not copy anything to their computer (as they do with package and ship).

  5. Publish as a geoprocessing service.
  6. You publish your toolbox as a geoprocessing service on an ArcGIS Server. Anyone with an Internet connection can use your tools.

There are a number of considerations when deciding on which method to use, such as:

These questions are used to motivate the topics that follow.

Package and ship

A very common method is to package and ship your ToolShare folder, as illustrated below.

Package and ship

Data considerations

The main reason to package and ship is that your user does not have access to your computer on your local area network (LAN). Otherwise, you would probably just give them access to your toolbox over the LAN and they would either copy the toolbox or use it directly. Since package and ship assumes your user doesn't have access to your share folder, they will not have access to any of the data on your network, so all tool data must also be sent to the user.

Because your user copies your folder to their local disk drive, you should use relative pathnames in your tools or map documents.

Learn more about using relative pathnames

Intermediate and scratch data

Your models and scripts will most likely need a location to write intermediate and scratch data. This location will be a folder or geodatabase on your user's local disk. Typically, you want your user to set their scratch workspace environment and use this environment setting as the location to write intermediate and scratch data.

Learn more about managing intermediate data in models

Learn more about managing scratch data in scripts

Licensing issues

With package and ship, the user of your tool executes the tool on their computer. The recipient may not have the necessary products or licenses to execute your tools.

Any script you want to share should have logic to check the proper extension licenses and product levels.

Learn more about license and product level checking in scripts

Even if the recipient has the necessary extension installed, they may not have obtained a license to use that extension in their current session. If they don't have a license, the tool will exit with an error message indicating that the extension is not enabled, and they will have to obtain a license by clicking Extensions under the Tools menu of their current application, such as ArcCatalog or ArcMap, and enabling the required extension.

Learn more about product and extension licensing with geoprocessing tools

NOTE: If the necessary extension is not installed, the tool might not appear in the toolbox.

You should, of course, document which extensions are required and take steps to ensure the user knows what extensions are required. These steps may not suffice for some users. A particularly bad scenario is when all the tools in your toolbox depend on an uninstalled extension and, as noted above, nothing appears when the user opens the toolbox. One solution is to provide a script tool within the delivered toolbox that checks for the necessary extensions and outputs messages if there are problems. Such a tool doesn't depend on any extension and will always be loaded into the toolbox. The user can then run this extension-checking tool and view informative messages.

Learn more about license checking in scripts

Technical note: it's not that the tool depends on the extension but whether it uses data types that are only installed with the extension. For example, the Network Analyst Hierarchy Settings data type is only installed with Network Analyst. When a tool is loaded, ArcGIS looks for all data types used by the tool and if it cannot find one, the tool is not loaded and will not appear in the toolbox.

Scripts

Any script you want to share should have logic to check the proper licenses and product levels.

Learn more about license and product level checking in scripts

If your Python scripts import other modules, you need to ensure that these other modules can be found. The easiest way is to put all scripts in the <Scripts> directory.

Learn more about sharing Python modules

Stylesheets

You can change the appearance of your tool dialog by supplying a stylesheet and a background image. The stylesheet and image must be delivered to your user.

Learn more about sharing stylesheets

System tools

System tools can always be found on any system containing ArcGIS, regardless of the pathname to the tool.

Sharing tools across a local area network

In a Local Area Network (LAN), folders can be shared with anyone that has access to the LAN, as illustrated below.

Shared folders on a LAN

To share your tools across a LAN, you need to share the folder containing your toolbox so it can be accessed using a UNC pathname. Sharing a folder across the LAN is a common practice. To share a folder, right-click the folder in either ArcCatalog or Windows Explorer, click Properties, click the Sharing tab, and choose Share this Folder, as shown below.

Sharing a folder

Just sharing your folder may not be enough—all tool data must either use relative pathnames or UNC pathnames to data, rather than the local pathname (such as E:\GPTools).

Learn more about sharing and connecting to UNC pathnames

Accessing ArcSDE data

Accessing ArcSDE Database Connections in your shared tools requires that you have an unambiguous reference to the Database Connection.

Learn more about accessing ArcSDE data in tools

Licensing

Tools executed across a LAN execute on the user's computer, so the same licensing issues apply as those described for packaging and shipping.

Intermediate and scratch data

Your models and scripts will most likely need a location to write intermediate and scratch data. This location will be a folder or geodatabase on your user's local disk. Typically, you want your user to set their scratch workspace environment and use this environment setting as the location to write intermediate and scratch data.

Learn more about managing intermediate data in models

Learn more about managing scratch data in scripts

Stylesheets

You can change the appearance of your tool dialog by supplying a stylesheet and a background image. The stylesheet and image must be delivered to your user.

Learn more about sharing stylesheets

Publishing to ArcGIS Server

ArcGIS Server allows you to share services across an enterprise (intranet) and across the web (internet). Services include toolboxes and maps. The main advantages of sharing your GIS resources with ArcGIS Server are the same as sharing any data through any kind of server technology—for instance, the data is centrally managed, supports multiple users, and provides clients with the most up-to-date information. Another advantage, particularly for geoprocessing, is that tools execute on the server computer, using the resources (such as licenses) found on the server computer.

Learn more about geoprocessing with ArcGIS Server

See Also