Why cant I get any geoprocessing tools to run in my script?
It's related to your license. If you have an ArcView or ArcEditor license you will need to include the SetProduct method in your code.
Learn more about accessing licenses and scripts in tools
How do I schedule a geoprocessing script to run at prescribed times?
Scripts can be scheduled to run at a later time—for example at midnight—or they can be scheduled to run daily, weekly or monthly. To do this you will need to use Windows Scheduled Tasks, which is available with Windows 2000 and Windows XP and sometimes available on Windows NT.
It is found in the following locations:
Windows XP: Start Menu > Control Panel > Scheduled Tasks. If the control panel is in Category View, select Performance and Maintenance > Scheduled Tasks.
Windows 2000 and NT: Start Menu > Settings > Control Panel > Scheduled Tasks
Having reached Scheduled Tasks, double-click Add Scheduled Task. Complete the options on the wizard.
Here are a few tips:
- When asked to Click the program you want Windows to run, select the Browse button and the script.
- If the program you want to run is a Python script with arguments:
Learn more about scheduling you tools for execution
If I create a script to share with someone that includes tools at a license level higher than they have, or includes extension product tools that they don't have, will the script run?
- In c:\python2x\, select Program you want Windows to run and select python.exe.
- On the last pane of the wizard, check Open advanced properties.
- In the Task properties dialog box, change 'Run:' to contain the python executable, your script, and the arguments you want the script to run. For example: c:\python21\python.exe c:\gisWork\myscript.exe c:\gisWork\gdb.mdb\counties 10
No. To execute the script successfully your user will need licensing for all the tools you call in the script.
Where can I find additional information about geoprocessing scripts, including samples?
Will AMLs run in the new geoprocessing framework?
ESRI Developer Network (EDN)
ArcScripts (ESRI Support Page)
Geoprocessing Support Page
Yes. It's possible to use Arc Macro Language files (AMLs) developed in the ArcGIS 9.x Desktop environment by creating a new geoprocessing script tool. If you have an ArcInfo license and ArcInfo Workstation installed, you can add a custom script tool that references an AML.
Learn more about using AMLs with script tools
Learn more about Python equivalents to AML functions
Learn more about Python equivalents to AML directives
How do I overwrite outputs in a Python script?
By default, outpus from geoprocessing tools are not overwritten. If you want your outputs to be overwritten you need to add the following line of code to your Python script:
gp.overwriteoutput = 1
Learn more about overwriting outputs using Python scripts
Please visit the Feedback
page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.