AnsweredAssumed Answered

Want to run my Python script as a script tool in a custom toolbox

Question asked by pierrek on Apr 29, 2014
Latest reply on May 2, 2014 by Wayne_Whitley
Hi there,

I wrote a Python script which allows me to select a layer out of my TOC and change the source to a new data source.
The script I wrote works fine and does the job.

Now I'd like to create a script tool with a user interface working out of a custom tool box.
I cannot get my head around with rewriting the script with variables and use it in conjunction with parameters as a script tool.

When I run my script tool it does not spill out any errors nor the script runs as I want it to. (It saves a new *.mxd but without any changes to the file).:confused:

There must be something wrong the way I set up the variables in my Python script and/or the way I setup the parameter in the script tool properties.

- Please find attached my original Python script which runs perfectly fine.
- Also a revised script for the script tool running within a custom tool box.
- ... and a screenshot of the parameter setup. (I did not make any changes to the parameter properties)

Any help would be terrific.