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:
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.
As you may know, you can create a handy button on an ArcMap toolbar to launch a script tool, use the following steps:
- Select 'Customize' > 'Customize mode…'
- Select the 'Commands' tab
- Under 'Categories', scroll down to select '[Geoprocessing tool]'
- Select 'Add Tools…'
- Browse to the custom toolbox > Select the script tool in toolbox > Select 'Add'. The script tool appears under 'Commands'.
- 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.
- Before closing the 'Customize' dialog, right-click on the tool in the toolbar to display text and image menu and modify these as desired.
- 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.