<?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: Looping Through Layers in Mxd and Saving Mxd Changes Extent in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335226#M26202</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any idea on this?&amp;nbsp; I've noticed it as well and can't deploy a script that is supposed to fix things to have it break something else.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've noticed that it resets your printer back to your default windows printer.&amp;nbsp; So if we had a mxd with a layout set to 36x68 on our plotter or a pdf writer, then after changing the source data, the layout is now set to our default laser printer at 8.5x11.&amp;nbsp; Not cool.&amp;nbsp; We are using Arc 10.0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As the orginal poster noted, why does the printer settings get changed when all you are changing is the source of the data?&amp;nbsp; Especially when this data is a duplicate of the previous data source?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Sep 2013 19:04:31 GMT</pubDate>
    <dc:creator>LorindaGilbert</dc:creator>
    <dc:date>2013-09-18T19:04:31Z</dc:date>
    <item>
      <title>Looping Through Layers in Mxd and Saving Mxd Changes Extent</title>
      <link>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335221#M26197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;To All Python Users:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a script that loops through all the layers in an mxd and then saves the mxd.&amp;nbsp; I have found that when I open up the saved mxd the extent of the map in the data view has changed even though I did not write code for the extent to change.&amp;nbsp; Has anyone come across this phenomenon before?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem I am finding is that the layout view, that could be setup for a print job, has changed.&amp;nbsp; Now the user has to go back and fix the extent for the layout to be printed correctly.&amp;nbsp; I am eventually looking to run this script on many mxds in batch and I do not want to disrupt all the mxds where the endusers need to go back and fix the extent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Why would the map extent change if all I am doing is looping through the layers in a python script?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 21:14:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335221#M26197</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2013-05-21T21:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Through Layers in Mxd and Saving Mxd Changes Extent</title>
      <link>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335222#M26198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just curious, have you read the df extent at the beginning if the run, then re-read the df extent at the end of the run where you've completed your layer manipulations in order to check for a difference?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If nothing else you may be able to 'reset' the df extent back to the original using the extent obj read at the beginning of the run.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Enjoy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wayne&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 22:12:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335222#M26198</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2013-05-21T22:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Through Layers in Mxd and Saving Mxd Changes Extent</title>
      <link>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335223#M26199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Wayne:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will try that, but it just seems like the extent should not change if the operations you are performing on the mxd have no connection to the extent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I added the following code for checking the extent before and after looping through the layer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;df = arcpy.mapping.ListDataFrames(mxd)[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;oldExtent = df.extent&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print("The old extent = " + str(oldExtent)) - Prints the dataframe extents before looping through layers&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I loop through layers and save mxd&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;df = arcpy.mapping.ListDataFrames(mxd)[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;newExtent = df.extent&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print("The new extent = " + str(newExtent)) - Prints the dataframe extents before looping through layers&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The extents that are printed out are identical, but the map has been zoomed out to almost double its intial extent.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 10:48:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335223#M26199</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2013-05-22T10:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Through Layers in Mxd and Saving Mxd Changes Extent</title>
      <link>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335224#M26200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;hmmm, could be a bug... I don't know, but if you're at 10.1, a possible workaround to try may be to save the extent to a bookmark, then when manipulating the layers, set the df.extent to the previously saved bookmark extent as shown in the help ref example from the link below.&amp;nbsp; I did not test this......but based on what you said it sounds like the extent is somehow being overridden by something else...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ListBookmarks (arcpy.mapping)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Desktop » Geoprocessing » ArcPy » Mapping module » Functions&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00s300000060000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//00s300000060000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A slight aside - I have set text elements X and Y page coordinates, and all would go well during testing, then the wheels would come off and the X coord set would take on some wild values --- I could still read the values, but something wasn't quite right about consistently writing the values.&amp;nbsp; So I tested a clunky workaround to loop on reading/writing until the read matched the write vals I intended --- not at all the 'safe' way to write code, but it worked.&amp;nbsp; It hasn't blown up, but if I remember correctly it would have to make the set twice in some instances to get it right.&amp;nbsp; Not saying that's related to your quirk, but something is interfering with your extent and you may not be able to trust the return vals.&amp;nbsp; What about the save process alone?--if you open the mxd, and simply save it again with arcpy, is the extent affected?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope you figure it out...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wayne&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 12:52:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335224#M26200</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2013-05-22T12:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Through Layers in Mxd and Saving Mxd Changes Extent</title>
      <link>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335225#M26201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If this is truely a problem, please report this to support services.&amp;nbsp; They'll need data and repro steps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 13:40:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335225#M26201</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2013-05-23T13:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Through Layers in Mxd and Saving Mxd Changes Extent</title>
      <link>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335226#M26202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any idea on this?&amp;nbsp; I've noticed it as well and can't deploy a script that is supposed to fix things to have it break something else.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've noticed that it resets your printer back to your default windows printer.&amp;nbsp; So if we had a mxd with a layout set to 36x68 on our plotter or a pdf writer, then after changing the source data, the layout is now set to our default laser printer at 8.5x11.&amp;nbsp; Not cool.&amp;nbsp; We are using Arc 10.0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As the orginal poster noted, why does the printer settings get changed when all you are changing is the source of the data?&amp;nbsp; Especially when this data is a duplicate of the previous data source?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 19:04:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335226#M26202</guid>
      <dc:creator>LorindaGilbert</dc:creator>
      <dc:date>2013-09-18T19:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Through Layers in Mxd and Saving Mxd Changes Extent</title>
      <link>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335227#M26203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Lorinda:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is a bug for this issue NIM092164 that ESRI has classified with a low severity (I don't agree with that assessment).&amp;nbsp; An ESRI Technical Support supervisor told me that only 6 users has identified this as an issue.&amp;nbsp; Please contact technical support about this issue so they might have more of an impetus to fix the bug.&amp;nbsp; I need to run my script in v10.0 before upgrading to v10.2, but the bug may still exist in v10.2 (I do not know).&amp;nbsp; What version of ArcGIS Desktop are you running python with?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 11:29:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335227#M26203</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2013-09-19T11:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Through Layers in Mxd and Saving Mxd Changes Extent</title>
      <link>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335228#M26204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Good Morning,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the reply.&amp;nbsp; Using V10.0 SP2.&amp;nbsp; I'm testing whether changing your default printer makes a difference, but that is an added step for the users.&amp;nbsp; Some of my users are not as computer/ESRI savvy as the rest of us and I'm just attempting to make the server switch easier for them (which there will be more in the future).&amp;nbsp; This is NOT accomplishing this goal.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have reported as a bug and related it to the issue NIM092164 too.&amp;nbsp; Thank you for letting me know that it had been reported and needed more reports to maybe get them off the stick and get it fixed.&amp;nbsp; I too will be upgrading to the newer releases, but luckily, this will be after this server change.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I agree that it is a bug that SHOULD be fixed.&amp;nbsp; There is ABSOLUTELY NO REASON for the printer and layout settings to be changed if you are not touching the layout window or doing anything with printing.&amp;nbsp; Or there should be a way of finding the printer and layout settings in Python to be able to be retained during updates.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The test for changing the default printer was minimially productive.&amp;nbsp; Most of our maps are either printed to a large size plotter or to Cute pdf writer.&amp;nbsp; If you use this pdf writer as the default printer in the windows system, then it will keep the pdf writer as the default, but still changes it to be the 8.5x11 size paper, but does retain the custom size the Map Page Size.&amp;nbsp; Interestingly, if you set the default to your plotter or to Adobe pdf printer, it changes the extent to 8.5x11 for both the paper size and the map paper size.&amp;nbsp; GRRRR&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 13:59:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335228#M26204</guid>
      <dc:creator>LorindaGilbert</dc:creator>
      <dc:date>2013-09-19T13:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Through Layers in Mxd and Saving Mxd Changes Extent</title>
      <link>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335229#M26205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Lorinda:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does your python script work on updating the datasources for annotation feature classes in SDE?&amp;nbsp; I thought mine was processing this type of layer, but it is not.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 15:49:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335229#M26205</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2013-09-19T15:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Through Layers in Mxd and Saving Mxd Changes Extent</title>
      <link>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335230#M26206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's a good question, I'm not sure.&amp;nbsp; We don't have that many layers of annotation.&amp;nbsp; The one mxd that I know has annotation is coming from a data source that wasn't changed.&amp;nbsp; I'll have to look through some of the 200+ mxds to see if any have annotation.&amp;nbsp; I'll do it the 'easy way' by looking at the text file that I had written out to show what was changed and if any broken links in the mxd.&amp;nbsp; I did notice that if there was a very old data source listed that no longer exists, it was less likely to change them and reported them as broken links.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll get back with an update in a bit.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 16:06:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335230#M26206</guid>
      <dc:creator>LorindaGilbert</dc:creator>
      <dc:date>2013-09-19T16:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Through Layers in Mxd and Saving Mxd Changes Extent</title>
      <link>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335231#M26207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I found one mxd that was using an annotation feature class, it does appear to have changed it according to the source under properties.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 17:48:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335231#M26207</guid>
      <dc:creator>LorindaGilbert</dc:creator>
      <dc:date>2013-09-19T17:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Through Layers in Mxd and Saving Mxd Changes Extent</title>
      <link>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335232#M26208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Do you need to process SDE annotation feature classes differently than standard SDE feature classes?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think I see why my annotation feature classes are not being processed.&amp;nbsp; I bypass group layers so I only process individual layers.&amp;nbsp; In looking at the properties of an annotation feature class, it appears to be a group layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you bypass group layers in your script?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 18:05:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335232#M26208</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2013-09-19T18:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Through Layers in Mxd and Saving Mxd Changes Extent</title>
      <link>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335233#M26209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I didn't put anything special into the script to look for a different type of feature class.&amp;nbsp; Here's a slightly modified copy of my script (to protect the innocent :cool: ).&amp;nbsp; I did use parts of other scripts that I found on the forums and on the resources page.&amp;nbsp; I do intent to make this script much more flexible for future use.&amp;nbsp; We have several SDE servers here, so being able to have a flexible script is a must.&amp;nbsp; Hope it helps you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also intend to create another script that will go through the layer files that we have saved for general use - next item on my list.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 18:40:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335233#M26209</guid>
      <dc:creator>LorindaGilbert</dc:creator>
      <dc:date>2013-09-19T18:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Through Layers in Mxd and Saving Mxd Changes Extent</title>
      <link>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335234#M26210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Lorinda:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How does your script handle group layers?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 19:01:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335234#M26210</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2013-09-19T19:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Through Layers in Mxd and Saving Mxd Changes Extent</title>
      <link>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335235#M26211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just checked my data driven pages mapbook which has groups within groups,&amp;nbsp; and it appears to have handled them like a champ and changed them to the new server.&amp;nbsp; Of course, when I turn the old database off next week, I may be eating my words &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt; .&amp;nbsp; But the source properties are showing up as I would expect if I had manually changed the data source.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 19:11:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335235#M26211</guid>
      <dc:creator>LorindaGilbert</dc:creator>
      <dc:date>2013-09-19T19:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Through Layers in Mxd and Saving Mxd Changes Extent</title>
      <link>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335236#M26212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Lorinda:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I just figured out why my script was not handling annotation feature classes.&amp;nbsp; Annotation feature classes are structured similarly to group layers and I had an If statement asking whether the focus layer was a group layer or not.&amp;nbsp; If the layer was seen as a group layer (as an annotation feature class is), the layer would not be processed.&amp;nbsp; This was faulty logic as other conditions would prevent a true group layer from being processed, but still allow an annotation feature class to be processed.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Sep 2013 15:26:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335236#M26212</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2013-09-20T15:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Through Layers in Mxd and Saving Mxd Changes Extent</title>
      <link>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335237#M26213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Grrr...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone else run into this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I turned off the old db last night and we attempted to run this script that I had created and NOW it doesn't change anything!&amp;nbsp; Yet it worked very well with the db on prior to this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have since turned the db back on and now the script works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So warning to all that may be looking into this - make sure that it is done with both databases and servers up and running.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If someone has managed to run a python script to replace the data source with the old source off, please let me know how you did because we are likely to run into this again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2013 13:19:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335237#M26213</guid>
      <dc:creator>LorindaGilbert</dc:creator>
      <dc:date>2013-09-27T13:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Through Layers in Mxd and Saving Mxd Changes Extent</title>
      <link>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335238#M26214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Lorinda:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How does your script handle broken datasources?&amp;nbsp; If you do not process broken datasources, then your script will never process connections to the old db if it is off while running the script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You may also be running into an issue where python is trying to get the old SDE connection properties so it knows where to resource the connection.&amp;nbsp; Since it does not see the old connection properties when the old db is off, it does not know what to do.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would think you would need to keep the old db around until you are certain that you have successfully processed all of your SDE connections.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2013 14:03:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335238#M26214</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2013-09-27T14:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Through Layers in Mxd and Saving Mxd Changes Extent</title>
      <link>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335239#M26215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Michael,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I had in the original script to at least let the user know that there are broken links (we still had some mxd's from two and three servers ago!!).&amp;nbsp; It would alert the user that there was a problem with certain data and then continue on.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Once the db was turned off, ALL feature classes were broken links and it wouldn't change anything at all.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was mainly putting the info on the forum as a warning to others to run these types of scripts before the db is turned off so that it has a better change of running properly.&amp;nbsp; With any luck, in future versions of AG and ArcPy (we are running 10.0) they will handle stuff like this better because sometimes you don't have the choice of being able to turn a db back on - especially if the server died completely and you had to move the db to another server.&amp;nbsp; You also don't always have to option of naming a server the same name.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So for now, I've turned the db back on for a few days to allow for the users to get to the directories with many mxd's (several with over 100) changed over.&amp;nbsp; Any others that are looked at later, will just have to use the repair data source option within ArcMap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2013 14:22:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335239#M26215</guid>
      <dc:creator>LorindaGilbert</dc:creator>
      <dc:date>2013-09-27T14:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Through Layers in Mxd and Saving Mxd Changes Extent</title>
      <link>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335240#M26216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Lorinda:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How would you be able to resource a datasource whose current properties you cannot access?&amp;nbsp; I'm not sure how ESRI would help in this scenario as the parameters you need in the findAndReplaceWorkspacePath can only be accessed if your SDE layer is not broken.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2013 15:04:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/looping-through-layers-in-mxd-and-saving-mxd/m-p/335240#M26216</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2013-09-27T15:04:39Z</dc:date>
    </item>
  </channel>
</rss>

