Script tool button portability problem

Discussion created by lgtateos on Apr 27, 2014
Latest reply on May 11, 2014 by lgtateos
Hi Folks,

As you may know, you can create a handy button on an ArcMap toolbar to launch a script tool, use the following steps:

  1. Select 'Customize' > 'Customize mode???'

  2. Select the 'Commands' tab

  3. Under 'Categories', scroll down to select '[Geoprocessing tool]'

  4. Select 'Add Tools???'

  5. Browse to the custom toolbox > Select the script tool in toolbox > Select 'Add'. The script tool appears under 'Commands'.

  6. Click on the script tool under 'Commands' and, holding the left mouse key down, drag the script tool between any existing buttons on any ArcMap toolbar. A black vertical bar appears when you're in between buttons in a position where the new button can be placed. Release the mouse button to drop it into position.

  7. Before closing the 'Customize' dialog, right-click on the tool in the toolbar to display text and image menu and modify these as desired.

  8. Click 'Close' on the 'Customize' dialog to save changes.

But the problem is, it does work if you move the map document (and toolbox and Python script to still maintain the relative location of the toolbox and Python script).  My question is,  is there a way to set it up for portability?   I.e., have the button use a relative path to the script tool?

Thanks for your help.