Tag Info

Hot answers tagged


As it turns out this is caused by an "issue" in the env.settings. I used arcpy.ResetEnvironments() and arcpy.ClearEnvironment("workspace") before using the arcpy.arcpy.MakeRasterLayer_management and everything worked as expected. arcpy.ClearEnvironment("workspace") arcpy.ResetEnvironments() AddRasterMxd = ...


Here is your answer: As you are trying to add a Cached Image Folder, you must use MakeImageServerLayer_management instead of MakeRasterLayer_management. Here is the simple snippet to do what you need. You can simply paste it into the python window and see the response. just change the path to your compact cache folder (Raster): import arcpy mxd = ...

Only top voted, non community-wiki answers of a minimum length are eligible