Nightly process

2451
3
04-23-2010 05:32 AM
randyhorner
New Contributor II
We need to run a nightly process from a batch file that will execute a spatial query and fill in attribute in a feature.  For example, query points to see which county they fall within and populate a county_name attribute.  I could write an arcobjects program to accomplish this but I was wondering if there is an easier way.  Python scripts perhaps.  Can these be run from a batch file executed from windows scheduler?  Is this reasonable or should I just bite the bullet and use arcobjects?

Thanks for any help.
0 Kudos
3 Replies
AlanToms
Occasional Contributor
I would suggest buidling it in Model Builder, export to Python, then add the Python script to the Scheduler.

Alan
0 Kudos
JK
by
Occasional Contributor
I want to do something similar.  I created a simple model (import a feature class).  Exported to Python.  Then I added the python script as a task in the windows task scheduler.  No luck.  It didn't run.  The models runs fine.  But after exporting it to python it fails.  I'm no Python export or Win 2003 export yet.

Am I missing s step?

Windows Server 2003
ArcSDE 9.3.1
ArcGIS Desktop-ArcInfo 9.3.1

Any help would be great.  Thanks.
0 Kudos
ChrisMathers
Occasional Contributor III
The export from model builder doesnt work right off the bat. Its kind of a wonky deal. You need to go throuh and clean up the script. For one it the data you are pulling from is probably feature layers in an mxd so you need to make sure that the paths point to actual feature classes. You would probably also do well to reduce the number of variables. The model builder export has tons of variables that point to the same few feature classes and dont need to be there. This is something ESRI needs to work on. Most people assume that the python export will work with no modification and it wont. if you post the code people may be able to help get it running
0 Kudos