<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Arcpy does not render maps correctly? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-does-not-render-maps-correctly/m-p/490190#M38359</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When using arcpy outside of arcGIS, I have a problem with it displaying layers. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;There are also some other layers which are always switched on. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Depending upon some options, my code will set the 'visible' property of the group layer to True before exporting to a tiff file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.G:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14134517880441493" jivemacro_uid="_14134517880441493" modifiedtitle="true"&gt;
&lt;P&gt;import arcpy&lt;/P&gt;
&lt;P&gt;import settings&lt;/P&gt;
&lt;P&gt;mxd = &lt;SPAN style="color: #6f008a;"&gt;arcpy&lt;/SPAN&gt;.&lt;SPAN style="color: #6f008a;"&gt;mapping&lt;/SPAN&gt;.&lt;SPAN style="color: #2b91af;"&gt;MapDocument&lt;/SPAN&gt;(&lt;SPAN style="color: #6f008a;"&gt;settings&lt;/SPAN&gt;.mapTemplate)&lt;/P&gt;
&lt;P&gt;for layer in arcpy.mapping.ListLayers(mxd):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (layer.isGroupLayer) and (layer.name == requested):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layer.visible = True&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print(layer.visible)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;arcpy.mapping.ExportToTiff(mxd, ("C:/test")&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Most of the time this code seems to work. The layer.visible always evaluates to True when I expect it to, but&amp;nbsp; ocassionally, the resulting tiff will not show the group layer that was switched on?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've seen references to similar problems with the visible command throughout geonet, but no specific answers. &lt;/P&gt;&lt;P&gt;Is this an issue that has been recognised by ESRI?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Oct 2014 09:34:54 GMT</pubDate>
    <dc:creator>JamesRamm</dc:creator>
    <dc:date>2014-10-16T09:34:54Z</dc:date>
    <item>
      <title>Arcpy does not render maps correctly?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-does-not-render-maps-correctly/m-p/490190#M38359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When using arcpy outside of arcGIS, I have a problem with it displaying layers. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;There are also some other layers which are always switched on. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Depending upon some options, my code will set the 'visible' property of the group layer to True before exporting to a tiff file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.G:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14134517880441493" jivemacro_uid="_14134517880441493" modifiedtitle="true"&gt;
&lt;P&gt;import arcpy&lt;/P&gt;
&lt;P&gt;import settings&lt;/P&gt;
&lt;P&gt;mxd = &lt;SPAN style="color: #6f008a;"&gt;arcpy&lt;/SPAN&gt;.&lt;SPAN style="color: #6f008a;"&gt;mapping&lt;/SPAN&gt;.&lt;SPAN style="color: #2b91af;"&gt;MapDocument&lt;/SPAN&gt;(&lt;SPAN style="color: #6f008a;"&gt;settings&lt;/SPAN&gt;.mapTemplate)&lt;/P&gt;
&lt;P&gt;for layer in arcpy.mapping.ListLayers(mxd):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (layer.isGroupLayer) and (layer.name == requested):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layer.visible = True&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print(layer.visible)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;arcpy.mapping.ExportToTiff(mxd, ("C:/test")&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Most of the time this code seems to work. The layer.visible always evaluates to True when I expect it to, but&amp;nbsp; ocassionally, the resulting tiff will not show the group layer that was switched on?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've seen references to similar problems with the visible command throughout geonet, but no specific answers. &lt;/P&gt;&lt;P&gt;Is this an issue that has been recognised by ESRI?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2014 09:34:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-does-not-render-maps-correctly/m-p/490190#M38359</guid>
      <dc:creator>JamesRamm</dc:creator>
      <dc:date>2014-10-16T09:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy does not render maps correctly?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-does-not-render-maps-correctly/m-p/490191#M38360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anyone have any experience with this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2014 09:16:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-does-not-render-maps-correctly/m-p/490191#M38360</guid>
      <dc:creator>JamesRamm</dc:creator>
      <dc:date>2014-10-20T09:16:45Z</dc:date>
    </item>
  </channel>
</rss>

