Hi, we've got an in-house gis server.
I bring in a layer but can't see it in Arcmap.
When I go into the table of contents and uncheck "Enable Cache View Mode" then I can see it.
I suppose I have to either do something to set up the cache, or else disable the cache view mode. I would like to do that programmatically.
This doesn't seem to work:
Dim pEnumLayer As IEnumLayer
pEnumLayer = cmap.Layers
pEnumLayer.Reset()
Dim player As ILayer
player = pEnumLayer.Next
Do While Not player Is Nothing
player.cached = false
Msgbox(str(player.cached))
'for some reason this is returning "4"
player = pEnumLayer.Next
Loop
When this code is run the layer remains with "Enable Cache View Mode" checked.
Solved! Go to Solution.
Hi
You did not write it but I understand it is image service (this is the service that has this button).
If it is unable by default it means you define the cache but did not build it.
Building the cache can take time, use the Manage Map Server Cache Tiles GP tools to build it.
You can republish the service without cache definition so it will not use it by default.
The way to do it using code in your situation is IImageServerLayer3.EnableCacheViewMode
Have fun
Mody
Hi
You did not write it but I understand it is image service (this is the service that has this button).
If it is unable by default it means you define the cache but did not build it.
Building the cache can take time, use the Manage Map Server Cache Tiles GP tools to build it.
You can republish the service without cache definition so it will not use it by default.
The way to do it using code in your situation is IImageServerLayer3.EnableCacheViewMode
Have fun
Mody