Script tool button portability problem

552
3
04-27-2014 03:35 AM
LT
by
Occasional Contributor
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.
Tags (2)
0 Kudos
3 Replies
TimBarnes
Occasional Contributor III
The customisation will be saved into the map document (.mxd) so ensure that the 'Store Relative Path Names' checkbox is turned on from the File>Map Document Properties and the document is saved again.
0 Kudos
LT
by
Occasional Contributor
Hi Tim,

thanks for the response, but that is not the problem.  I have tested that, as well as checking 'save all customizations to the document' inside customize mode > options.

Does anyone know a solution?  This makes the button entirely useless for sharing unless you're able to set it up on the other person's machine for them.
0 Kudos
LT
by
Occasional Contributor
Does anyone else have any insights?  Is this a bug or am I missing some setting?
0 Kudos