<?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: arcpy FindReplace Data Sources in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-findreplace-data-sources/m-p/1088349#M62068</link>
    <description>&lt;P&gt;Yeah, I didn't copy the code over probably so you might have missed it but the save copy function is there and it does save a copy but none of the datasources are altered.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Aug 2021 11:22:58 GMT</pubDate>
    <dc:creator>GIS_AdminCity_of_Charlottetown</dc:creator>
    <dc:date>2021-08-12T11:22:58Z</dc:date>
    <item>
      <title>arcpy FindReplace Data Sources</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-findreplace-data-sources/m-p/1087972#M62037</link>
      <description>&lt;P&gt;Using this&amp;nbsp;&lt;A href="https://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-mapping/updatingandfixingdatasources.htm" target="_blank" rel="noopener"&gt;https://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-mapping/updatingandfixingdatasources.htm&lt;/A&gt;&amp;nbsp;as a guide I am trying to find and replace the datasources in my mxd to enterprise gis sources but the new mxd created just has the same datasources. I tried doing a find and replace to another filegeodatabase but it still isn't doing the replace.&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;... mxd = arcpy.mapping.MapDocument(r'Z:\GIS\scratch\Workspaces_SDE\GDB.mxd')&lt;BR /&gt;... mxd.findAndReplaceWorkspacePaths(r'K:\Water and Sewer\Services\Services.gdb', r'Z:\GIS\scratch\20210809.gdb')&lt;BR /&gt;... mxd.saveACopy(r'Z:\GIS\scratch\Workspaces_SDE\SDE.mxd')&lt;BR /&gt;... del mxd&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is the issue the spaces?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2021 16:11:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-findreplace-data-sources/m-p/1087972#M62037</guid>
      <dc:creator>GIS_AdminCity_of_Charlottetown</dc:creator>
      <dc:date>2021-08-11T16:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy FindReplace Data Sources</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-findreplace-data-sources/m-p/1088038#M62047</link>
      <description>&lt;P&gt;You need to save it after.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;mxd.save()&lt;/PRE&gt;&lt;PRE&gt;mxd.saveACopy(&lt;SPAN class="hljs-string"&gt;r"C:\Users\SMALIS\Documents\ArcGIS\pythonSwitchSourceNEW.mxd"&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2021 18:29:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-findreplace-data-sources/m-p/1088038#M62047</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2021-08-11T18:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy FindReplace Data Sources</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-findreplace-data-sources/m-p/1088141#M62058</link>
      <description>&lt;P&gt;I tested the following and it worked for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy

mxd = arcpy.mapping.MapDocument(r"C:\Temp\MxdDataSourceTest.mxd")
mxd.findAndReplaceWorkspacePaths(r"C:\Temp\BPs.gdb",r"C:\Temp\BPs_1.gdb")
mxd.saveACopy(r"C:\Temp\MxdDataSourceTest2.mxd")

print 'done'&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 11 Aug 2021 20:47:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-findreplace-data-sources/m-p/1088141#M62058</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2021-08-11T20:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy FindReplace Data Sources</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-findreplace-data-sources/m-p/1088349#M62068</link>
      <description>&lt;P&gt;Yeah, I didn't copy the code over probably so you might have missed it but the save copy function is there and it does save a copy but none of the datasources are altered.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 11:22:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-findreplace-data-sources/m-p/1088349#M62068</guid>
      <dc:creator>GIS_AdminCity_of_Charlottetown</dc:creator>
      <dc:date>2021-08-12T11:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy FindReplace Data Sources</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-findreplace-data-sources/m-p/1088351#M62069</link>
      <description>&lt;P&gt;That is pretty much what I am doing without the print "done" at the bottom. Not sure what is happening it runs as if it worked with no errors but the datasources are unchanged. I even tried to replace something simple like "K" to "LOL" and it still didn't work (I choose LOL so it would stand out). I even put it in a try statement with an error capture and nothing.&lt;BR /&gt;Thoughts?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 11:27:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-findreplace-data-sources/m-p/1088351#M62069</guid>
      <dc:creator>GIS_AdminCity_of_Charlottetown</dc:creator>
      <dc:date>2021-08-12T11:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy FindReplace Data Sources</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-findreplace-data-sources/m-p/1088781#M62082</link>
      <description>&lt;P&gt;Maybe a bug: BUG-000137385&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEzNzM4NQ==" target="_blank"&gt;https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEzNzM4NQ==&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 07:47:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-findreplace-data-sources/m-p/1088781#M62082</guid>
      <dc:creator>JohannesBierer</dc:creator>
      <dc:date>2021-08-13T07:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy FindReplace Data Sources</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-findreplace-data-sources/m-p/1091645#M62167</link>
      <description>&lt;P&gt;That is good to know but the work around is literally doing it manually something I am trying to avoid lol.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 10:44:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-findreplace-data-sources/m-p/1091645#M62167</guid>
      <dc:creator>GIS_AdminCity_of_Charlottetown</dc:creator>
      <dc:date>2021-08-24T10:44:53Z</dc:date>
    </item>
  </channel>
</rss>

