Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Script tool button portability problem

$
0
0
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.

Viewing all articles
Browse latest Browse all 2485

Trending Articles