<?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: Repoint Layer from Mapped Drive to UNC Path with Arcpy? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/repoint-layer-from-mapped-drive-to-unc-path-with/m-p/403568#M31781</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rebecca. To clarify - I am not trying to fix broken links. What I am trying to do is consistently repoint existing links from a mapped drive to a UNC path. From what I can tell the addin will only fix broken links. Is that correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Nov 2016 21:14:58 GMT</pubDate>
    <dc:creator>MicahBabinski</dc:creator>
    <dc:date>2016-11-29T21:14:58Z</dc:date>
    <item>
      <title>Repoint Layer from Mapped Drive to UNC Path with Arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/repoint-layer-from-mapped-drive-to-unc-path-with/m-p/403566#M31779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using ArcGIS Desktop 10.3.1 in a Citrix environment. I am working on a script that will automate preparing an MXD to publish as a service. One of the requirements is that all our layers point to UNC path data sources, but all of our corporate data is managed using mapped letter drives. So I need to repoint the layers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have folder connections to the data source using the mapped letter drive&amp;nbsp;&lt;EM&gt;and&amp;nbsp;&lt;/EM&gt;the UNC path. However, when I use the "Set Data Source" method from the layer properties, it stays mapped to the letter drive path!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I used arcpy mapping to create a layer object for that layer, and use the findAndReplaceWorkspacePath and replaceDataSource method to try to point it to the UNC path. No dice: the path still has the mapped letter drive and not the UNC path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I tried a workaround. I created a new, empty file geodatabase and exported all of the layers in my map to that workspace. Then I closed the map document and deleted the file geodatabase. I opened up the map (all the layers were broken) and repointed to the UNC path. Finally, that worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I try to replicate that workflow in arcpy, I wind up with mapped letter drives in the workspace path again. Any suggestions on how to resolve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not, perhaps you could go to this i&lt;A _jive_internal="true" href="https://community.esri.com/ideas/12598-setting-a-data-source-from-a-mapped-drive-to-a-unc-path"&gt;dea&lt;/A&gt; and upvote it! This seems like a pretty significant bug.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Micah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2016 20:13:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/repoint-layer-from-mapped-drive-to-unc-path-with/m-p/403566#M31779</guid>
      <dc:creator>MicahBabinski</dc:creator>
      <dc:date>2016-11-29T20:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: Repoint Layer from Mapped Drive to UNC Path with Arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/repoint-layer-from-mapped-drive-to-unc-path-with/m-p/403567#M31780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a python addin &lt;A href="https://community.esri.com/blogs/myAlaskaGIS/2015/08/31/python-addin-for-data-inventory-and-broken-link-repair"&gt;/blogs/myAlaskaGIS/2015/08/31/python-addin-for-data-inventory-and-broken-link-repair&lt;/A&gt;&amp;nbsp;&amp;nbsp; That will allow you to do this.&amp;nbsp; Take a look at the sample.xls I have to see some of the "broken path"&amp;nbsp; and&amp;nbsp; "new path".&amp;nbsp; If you run the "3a-Create Unique list of Broken Links" from a machine that you know doesn't have the correct path, the .xls file will be created, then you just correct the paths.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you don't want to use the tools, you can just unzip and take a looks at the scripts and how I handled it.&amp;nbsp; Might give you some ideas on what you need.&amp;nbsp; Been a while since I've worked on this tools, so don't remember the specifics.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2016 20:22:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/repoint-layer-from-mapped-drive-to-unc-path-with/m-p/403567#M31780</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2016-11-29T20:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Repoint Layer from Mapped Drive to UNC Path with Arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/repoint-layer-from-mapped-drive-to-unc-path-with/m-p/403568#M31781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rebecca. To clarify - I am not trying to fix broken links. What I am trying to do is consistently repoint existing links from a mapped drive to a UNC path. From what I can tell the addin will only fix broken links. Is that correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2016 21:14:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/repoint-layer-from-mapped-drive-to-unc-path-with/m-p/403568#M31781</guid>
      <dc:creator>MicahBabinski</dc:creator>
      <dc:date>2016-11-29T21:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: Repoint Layer from Mapped Drive to UNC Path with Arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/repoint-layer-from-mapped-drive-to-unc-path-with/m-p/403569#M31782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes, but as I mention in my notes, broken is in the eye of the beholder, meaning, run the broken link tool from a machine that doesn't have the same drive letter mapping and they will come up as broken.&amp;nbsp; If you notice, the first couple tools only create output "report" files so you can test to see.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if you can't make them appear broken, you can look at the tool's script and maybe see how I am using the replacement for UNC paths.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, as always, test on a copy of the mxd , not the originals. &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2016 21:37:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/repoint-layer-from-mapped-drive-to-unc-path-with/m-p/403569#M31782</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2016-11-29T21:37:19Z</dc:date>
    </item>
  </channel>
</rss>

