Quantcast
Channel: Forums - Geoprocessing
Viewing all articles
Browse latest Browse all 1952

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

$
0
0
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.
Thanks
Pierre
Attached Thumbnails
Click image for larger version

Name:	script_tool_properties.JPG‎
Views:	N/A
Size:	52.7 KB
ID:	33465  
Attached Files

Viewing all articles
Browse latest Browse all 1952

Trending Articles