<?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 Re: setting MapDocument.activeView causes existing layers to disappear in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/setting-mapdocument-activeview-causes-existing/m-p/369637#M12712</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Do not change the active data frame in Geoprocessing scripts. Before a geoprocessing tool runs, it takes a snapshot of the active data frame's layers, and then restores it when it finishes executing. By changing the active data frame in between the snapshot and the restore, it gets into a confused state and may drop layers.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Mar 2011 22:58:32 GMT</pubDate>
    <dc:creator>JasonScheirer</dc:creator>
    <dc:date>2011-03-25T22:58:32Z</dc:date>
    <item>
      <title>setting MapDocument.activeView causes existing layers to disappear</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/setting-mapdocument-activeview-causes-existing/m-p/369636#M12711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have one mxd with two data frames ['Layers', 'New Data Frame'] with layers in them. If Layers is active and I use the lines below in the command line window:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;mxd = arcpy.mapping.MapDocument('Current')
df = arcpy.mapping.ListDataFrames(mxd, 'New Data Frame')[0]
mxd.activeView = df&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;New Data Frame is made active and I see the layers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If use the same commands in a geoprocessing script, the layers are removed from the data frame before it is made active.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone know what's going on?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2011 22:46:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/setting-mapdocument-activeview-causes-existing/m-p/369636#M12711</guid>
      <dc:creator>EvanThoms</dc:creator>
      <dc:date>2011-03-25T22:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: setting MapDocument.activeView causes existing layers to disappear</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/setting-mapdocument-activeview-causes-existing/m-p/369637#M12712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Do not change the active data frame in Geoprocessing scripts. Before a geoprocessing tool runs, it takes a snapshot of the active data frame's layers, and then restores it when it finishes executing. By changing the active data frame in between the snapshot and the restore, it gets into a confused state and may drop layers.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2011 22:58:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/setting-mapdocument-activeview-causes-existing/m-p/369637#M12712</guid>
      <dc:creator>JasonScheirer</dc:creator>
      <dc:date>2011-03-25T22:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: setting MapDocument.activeView causes existing layers to disappear</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/setting-mapdocument-activeview-causes-existing/m-p/369638#M12713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We reproduced this bug an will hopefully be able to address it in the next service pack.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to check its status, it is: NIM066646&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Mar 2011 15:55:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/setting-mapdocument-activeview-causes-existing/m-p/369638#M12713</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2011-03-27T15:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: setting MapDocument.activeView causes existing layers to disappear</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/setting-mapdocument-activeview-causes-existing/m-p/369639#M12714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Excellent! Thank you Jeffery.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2011 17:16:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/setting-mapdocument-activeview-causes-existing/m-p/369639#M12714</guid>
      <dc:creator>EvanThoms</dc:creator>
      <dc:date>2011-03-28T17:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: setting MapDocument.activeView causes existing layers to disappear</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/setting-mapdocument-activeview-causes-existing/m-p/369640#M12715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;and Jason! Thank you for the explanation.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2011 17:18:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/setting-mapdocument-activeview-causes-existing/m-p/369640#M12715</guid>
      <dc:creator>EvanThoms</dc:creator>
      <dc:date>2011-03-28T17:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: setting MapDocument.activeView causes existing layers to disappear</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/setting-mapdocument-activeview-causes-existing/m-p/369641#M12716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This issue will be addressed in service pack 3.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2011 19:59:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/setting-mapdocument-activeview-causes-existing/m-p/369641#M12716</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2011-08-22T19:59:27Z</dc:date>
    </item>
  </channel>
</rss>

