Select to view content in your preferred language

Convert python script to stand-alone tool in toolbox

3285
2
04-30-2010 01:19 PM
JeffChristiansen
Emerging Contributor
I have a Python script which accepts a few arguments.  I created my own toolbox in ArcToolbox and added the script to that toolbox, then also added the documentation and everything to go along with that. 

I then sent that toolbox and script to another user.  They can add the toolbox, and that toolbox shows the script icon inside, along with the associated help documentation, but the script isn't actually there because the path reference to the script file is the path from my computer.  I.e., the toolbox doesn't reference the relative path (i.e., same directory as the toolbox), but rather references the absolute path from my computer.

I know from other scripts that I've downloaded from here that it must be possible to have the toolbox reference the relative path, but I'm not sure how to accomplish that.  Any ideas?
0 Kudos
2 Replies
ShitijMehta
Esri Regular Contributor
try setting the relative path option for the script tool.
right click the script tool in Arc Catalog-->Properties-->General tab--> check the relative path option.

make sure your script tool points to the correct script that you are sharing along with your tool.
0 Kudos
JeffChristiansen
Emerging Contributor
I figured it would be something simple like that!  Thanks.

Now if I could just figure out how to mark this thread as answered - or do they do that anymore in the new format?
0 Kudos