1

I'm extracting image of .mxd map containing 3 layers, one of which is WMS layer, using standalone script. For some reason (I guess wms is unavailable at the moment) in about 10% of extractions WMS layer is not presented on image. Is there any way to check if layer is loaded (drawn)? Something like prolonging the response time or refreshing layers right before extraction (but with assurance that layer is loaded). I use ArcGIS Desktop 10.0

mxd = arcpy.mapping.MapDocument(mappath)
df = arcpy.mapping.ListDataFrames(mxd, '*')[0]
df.extent = newExtent
mxd.activeView = 'PAGE_LAYOUT'
arcpy.mapping.ExportToPNG(mxd, pngname, resolution=100)

Your Answer

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

Browse other questions tagged or ask your own question.