AnsweredAssumed Answered

Arcpy does not render maps correctly?

Question asked by JamesRamm on Oct 16, 2014
Latest reply on Oct 20, 2014 by JamesRamm

When using arcpy outside of arcGIS, I have a problem with it displaying layers.


My map consists of group layer which is 'switched off' by default and in this group layer are a few individual layers, which are 'switched on' by default.

There are also some other layers which are always switched on.


Depending upon some options, my code will set the 'visible' property of the group layer to True before exporting to a tiff file.




import arcpy
import settings
mxd = arcpy.mapping.MapDocument(settings.mapTemplate)
for layer in arcpy.mapping.ListLayers(mxd):
     if (layer.isGroupLayer) and ( == requested):
            layer.visible = True

arcpy.mapping.ExportToTiff(mxd, ("C:/test")


Most of the time this code seems to work. The layer.visible always evaluates to True when I expect it to, but  ocassionally, the resulting tiff will not show the group layer that was switched on?


I've seen references to similar problems with the visible command throughout geonet, but no specific answers.

Is this an issue that has been recognised by ESRI?