|
POST
|
I have a few simple suggestions to start with. 1.) Under the General tab, make sure you check Run with highest privileges 2.) Under the Actions tab, make sure you put the path to the python script (or bat file that calls the python script) in the Start in box. I hope this will solve your problem.
... View more
05-17-2012
07:41 AM
|
0
|
0
|
12328
|
|
POST
|
To try to minimize problems like this in the future, you should try to make standardized naming conventions for SDE connections in ArcCatalog. In this way you would not need to find out what each user named their similar SDE connections.
... View more
05-17-2012
05:21 AM
|
0
|
0
|
1065
|
|
POST
|
Please correct me if I am wrong, but I believe circular arcs are Bezier curves. You can use the arcpy.Densify_edit method in python to remove these curves. Here is the ESRI documentation for this method: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001v00000003000000.htm I hope this is what you are looking for.
... View more
05-15-2012
05:28 AM
|
0
|
0
|
851
|
|
POST
|
Layer.replaceDataSource is the method you are looking for. I believe this script would be more complex as you will need to map the old datasource to the new datasource. I have done this by calling a def function where it looks for a specific input layer name and that is mapped to the new layer name with its new parameters. In your case this def could get pretty big as you say you have 200 shapefiles in your mxd(s) that need to be linked to new SDE layers. The reference from thales007 has the link to this documentation.
... View more
05-15-2012
04:33 AM
|
0
|
0
|
3767
|
|
POST
|
To create an Environmental Variable on Windows 2008 Server (It may be different on Windows 7 especially since it does not sound like it is a Server), you go to the Start menu in the lower left corner. Right click on Computer in the right side pane and select Properties. On the left side select Advanced system settings and near the bottom of this page is Environmental Variables. Click on this button. Click on New and set the variable as PYTHONPATH and browse to the directory where the Python.exe file is located. That should do it.
... View more
05-14-2012
12:03 PM
|
0
|
0
|
950
|
|
POST
|
Charles: You can open up Notepad and copy my example into the file and name it whatever you want. I would place it in the same folder as the python script and a log file you can create that would provide information on how the bat process and python script functioned if you have arcpy.print messages written into it. You would create a new Environmental Variable named PYTHONPATH that would be directed to the directory where python.exe is installed (In my case it is located at c:\Python26\ArcGIS10.0).
... View more
05-14-2012
11:32 AM
|
0
|
0
|
950
|
|
POST
|
Charles: I execute all my python scripts from a bat file that I assign to the Scheduled Tasker. Here is a simple example of a bat file that calls 1 python script: @echo off echo Start time: %time% > Road_Simplify.log REM Run the python script echo ------ Update time: %time% echo ------ Removing Bezier curves from Roads -------- echo ------ Removing Bezier curves from Roads -------- >> Road_Simplify.log 01_Bezier_Remover.py >> Road_Simplify.log echo End time: %time% >> Road_Simplify.log @echo on Please notice that I do not need the full path to the python script as I have PYTHONPATH set as an environmental variable.
... View more
05-14-2012
10:40 AM
|
0
|
0
|
950
|
|
POST
|
Charles: How are you executing this python script in the Windows 7 Task Scheduler? Are you calling the python script directly or are you calling it in another script such as a bat file? I was having a similar issue on a Windows 2008 Server. I had to add PYTHONPATH environmental variable to the directory where the python.exe file resides, in order for python to execute properly without having to specify the full path to the python scripts. In addition, under Task Scheduler I have set the task to run under highest privileges as this is what many other needed to configure in order for their scripts to run properly. I hope this information helps.
... View more
05-14-2012
08:00 AM
|
0
|
0
|
950
|
|
POST
|
Thanks for the feedback Brad, but I found a better solution where I was able to use my customized locator style from v9.3.1 in v10.0. I made the mistake of copying the .loc, .loc.xml, and .lox files from a v9.3.1 box thinking that I would recreate the address locator in v10.0 from these files. I thought I would see the style I was looking for in the Address Locator Style dropdown box, but it was never available. I then copied the .lot style file from v9.3.1 and I was then able to get an address locator where it asked the user for an address in 1 input box and a zone in a second input box.
... View more
05-10-2012
06:43 AM
|
0
|
0
|
739
|
|
POST
|
Luca: If this is the case, then are you sure the spatial reference in the line below is legitimate. outCS = arcpy.SpatialReference('WGS 1984 UTM Zone 32N') Try running your code with the projection from ESRI's example and see if it also errors out on that. If not, then it might be the syntax of the projection you are using. I hope this helps.
... View more
05-09-2012
09:42 AM
|
0
|
0
|
977
|
|
POST
|
I think this is one place, amongst many, where ESRI can improve the error messages in python. The error message "Runtime error <type 'exceptions.RuntimeError'>: ERROR 999999: Error executing function" is so generic that it is hard to pinpoint what the exact problem is with the code. It would have been nice if the error message could inform the developer that it was looking for a prj file and not a text string that was representing the name of the projection.
... View more
05-09-2012
08:16 AM
|
0
|
0
|
977
|
|
POST
|
Does anyone from ESRI have any feedback on this issue? I am interested because in 9.3.1 I use a Composite Address Locator style that I am able to rebuild with RebuildAddressLocator_geocoding with python 2.6 from ArcGIS v10.0, so I am curious if an actual Composite Locator that I create in v10.0 will not get rebuilt with this function in python. Are there any general Rebuild issues in v10.0 besides the Composite Locator as I get this error with a Single Field locator? ERROR 000005: Could not open the address locator. Failed to execute (RebuildAddressLocator). Any help or hints regarding this issue are greatly appeciated. Thanks.
... View more
05-08-2012
11:52 AM
|
0
|
0
|
2262
|
|
POST
|
halyazeedi: I think you would need to modify the script from thales007 to have the destination path be a connection to SDE that you have saved on your computer with ArcCatalog. The third line with findAndReplaceWorkspacePaths is a composite of the 1st two lines (that have been commented out) where the source is the current shapefile and the destination is the SDE geodatabase. You might have some issues with field types in the transition from shapefiles to SDE that you would need to work through. You would also need to ensure that you have read access to all the associated feature classes in SDE from the SDE connection that you are using. import arcpy mxd = arcpy.mapping.MapDocument(r"C:\Project\Project_default.mxd") 'mxd.findAndReplaceWorkspacePaths(r"C:\Project\Data", r"C:\Project\Data2") 'mxd.findAndReplaceWorkspacePaths(r"C:\Project\Connection to Default.sde", r"C:\Project\Connection to Version1.sde") mxd.findAndReplaceWorkspacePaths(r"C:\Project\Data", r"C:\Project\Connection to Version1.sde") mxd.saveACopy(r"C:\Project\Project_V1.mxd") del mxd
... View more
05-08-2012
09:41 AM
|
0
|
0
|
3767
|
|
POST
|
I would create a bat file such as this that would call the python script(s) that you created. I have additional documentation that is sent to the log file to help indentify when each script is being run. Just give it a file name such as Update.bat @echo off echo Start time: %time% > update_data.log echo ------------ Start time: %time% echo ------------ Refreshing Database ----------------------- echo ------------ Refreshing Database ----------------------- >> update_data.log 01_Data.py >> update_data.log echo End time: %time% echo ' ' >> update_data.log echo End time: %time% >> update_data.log @echo on I hope this helps.
... View more
05-02-2012
10:28 AM
|
0
|
0
|
1288
|
|
POST
|
To All ArcGIS Users: In ArcGIS v10 I created an address locator using the US Streets with Zone locator style. With this style, the address locator asked the user for an address plus a zone to input. In ArcGIS v10 I tried using the US Address - Dual Ranges to duplicate this style. The problem is that there is no input box for the user to enter the zone to limit the returned results. Does anyone know of another address locator that would provide this default functionality? If not, how would one add this functionality to a locator style file? Any help or hints are greatly appreciated. Thanks.
... View more
05-02-2012
05:20 AM
|
0
|
4
|
3310
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-26-2025 06:10 AM | |
| 1 | 09-04-2025 02:19 PM | |
| 1 | 08-29-2025 08:29 AM | |
| 1 | 08-21-2025 12:45 PM | |
| 1 | 07-25-2025 09:09 AM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|