Update tiles with Manage Tile Cache tool?

806
2
11-21-2016 12:18 PM
New Contributor III

I'm trying to use the Manage Tile Cache tool (ManageTileCache_management, not the server tool ManageMapServerCacheTiles_server) in a Python script to create a tile cache dataset for some of our data.  According to the documentation, it can be used to "create new tiles, replace missing tiles, overwrite outdated tiles, and delete tiles." (Emphasis mine.) 

From the descriptions of the in_cache_location and in_cache_name parameters, and being unable to find much in the way of examples, I assumed that passing a value (the dataset name) for in_cache_name would create a tile cache, and passing None (and using the full dataset path in in_cache_location) would update an existing tile cache. I was able to successfully create a tile cache based on this assumption.

However, trying to update the cache later on, the latter method (in_cache_location="path/to/dataset", in_cache_name=None) caused an error 000735 "Cache Name: Value is required" (despite that in_cache_name is labelled "optional" in the documentation), while the former (in_cache_location="path/to/", in_cache_name="dataset") caused an error 000258 "Output already exists" (well, that was the plan, and now I want to update it).
That said, how do I use this tool to update a tile cache?  Am I doing something wrong? or is this a bug I'll need to work around?
2 Replies
MVP Esteemed Contributor

you said you were doing this in a script, which suggests that specifying None isn't the same as not specifying anything at all in the call to the function like

arcpy.ManageTileCache_management("C:/CacheDatasets/Manage", "RECREATE_ALL_TILES")

param1 = "C:/CacheDatasets/Manage"

param2 = "RECREATE_ALL_TILES"

arcpy.ManageTileCache_management(in_cache_location=param1,  manage_mode=param2)

somewhat overtly

with nothing else added, since the optional parameters need not be specified in a script, just the **kwargs name

Manage Tile Cache—Help | ArcGIS for Desktop 

Reply
0 Kudos
Esri Contributor

Hi Brandon,

Did you manage to find a solution to this issue?

Mark

Regards,
Mark
Reply
0 Kudos