Select to view content in your preferred language

Is arcpy.managemapservercachetiles not working in arcgis 10?

3802
1
08-06-2010 10:34 AM
by Anonymous User
Not applicable
Original User: keeblerh

I am trying to automate the caching for a tiled service and was planning to use the arcpy.manageMapServerCacheTiles and the python script examples I have seen to cache all levels by extent.  The scripts runs very quickly, says it is complete and when you look at the cache dir it looks as though all of the levels have been touched (date/time updated) but it doesn't really cache much of anything.  I saw that this capability did not work for scripting in 9.3.1.  Does it still not work in ArcGIS 10?  The following is the python script I am running:

# These lines are used to access ArcGIS geoprocessing tools
import arcpy, sys
from arcpy import env

# Here is where you define the input parameter values for the update tool.
# Empty quotes take the default value.
server = "mddehvarcs01"
service = "DEH_BaseMap_Tiled"
dataFrame = "Layers"
inputLayers = ""
extent = "-77.6402, 38.9205, -76.8030, 39.3593"
scales = ""
updateMode = "Recreate All Tiles"
threadCount = "3"
antialiasing = "NONE"
pathToFeatureClass = ""
ignoreStatus = ""

    result = arcpy.ManageMapServerCacheTiles_server(server, service, dataFrame,
                                           inputLayers, scales, updateMode,
     extent, threadCount,
     antialiasing, pathToFeatureClass,
     ignoreStatus)

-------------------------
I may be just doing something stupid but cannot quite figure out what.  Thanks.
1 Reply
by Anonymous User
Not applicable
Original User: keeblerh

Based on some other threads I had seen I updated the previous python script to explicity identify the layers and scales.  I'm still having no luck.  I even tried to use the arctoolbox manage server cache tiles (which I believe runs the same thing behind the scenes).  If I cache directly from ArcCatalog (map services properties) everything works just fine.

I am attaching the latest script which was generated from the arctoolbox model:

arcpy.ManageMapServerCacheTiles_server("dehgbvwsrags", "DEH_BaseMap_Tiled", "Layers", "'Rail Stations';Schools;'Police Stations';'Fire Stations';Hospitals;Streets;'Rail Lines';Airport;HydroLines;HydroAreas;Parks;'Place Names';Major_Streets;'Poltical Boundaries'", "577143.747208662;288571.873604331;144285.936802165;72142.9684010827;36071.4842005414;18035.7421002707;9017.87105013534;4508.93552506767;1800;560", "Recreate All Tiles", "-77.4804 39.1938 -77.1659 39.0473", "8", "NONE", "", "IGNORE_COMPLETION_STATUS_FIELD")

Additionally, does anyone know what "failed to manage tiles for the extent (......) at level"  mean?
I have been searching the documentation and web for an explanation but can  not find any.   It doesn' seem to be a show stopper.  Thanks to anyone who can offer any assistance.
0 Kudos