I know that Esri has exposed many properties to the arcpy lib for publishing services. I need to publish a tiled/cached map service but I need to set the min/max scale when I do that. Can this be accomplished via Python code? I don't see it as a property on the help page of the CreateMapSDDraft script. Is it just not supported or am I doing something wrong?


These are the basic steps I've taken to create a cached map service using Python:

  1. arcpy.mapping.CreateMapSDDraft() tool creates the service definition draft;
  2. arcpy.server.StageService() creates the publishable service definition file;
  3. arcpy.server.UploadServiceDefinition() uploads the SD to the map servers;
  4. arcpy.server.CreateMapServerCache() sets the cache parameters, including map scales, for the map service;
  5. arcpy.server.ManageMapServerCacheTiles() starts the caching process.

The arcpy.server.ManageMapServerCacheScales() tool can be used to alter the caching scales but I find it easier to delete and recreate.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.