<?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: Can the layer name in the TOC be updated using arcpy? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/can-the-layer-name-in-the-toc-be-updated-using/m-p/721942#M55883</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It happens to everyone. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Aug 2015 17:17:16 GMT</pubDate>
    <dc:creator>IanMurray</dc:creator>
    <dc:date>2015-08-19T17:17:16Z</dc:date>
    <item>
      <title>Can the layer name in the TOC be updated using arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/can-the-layer-name-in-the-toc-be-updated-using/m-p/721940#M55881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm working on a script to update all my broken links in my mxd's do to server and folder changes.&amp;nbsp; Some of these changes are from one data type to another. I'm working my way thru the various combinations, and now working on an old SDE to FGDB.&amp;nbsp; Unfortunately the name in my Table of Contents is still called the default SDE connection name (e.g. SDE_COMMON.SDEWILD.NED_HILLSHADECLIP).&amp;nbsp; I would like to rename this in the TOC to just NED_HILLSHAPECLIP in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In short, I need to replace my&amp;nbsp;&amp;nbsp; "lyr.name"&amp;nbsp; with&amp;nbsp;&amp;nbsp; "lyr.datasetName"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to do this in python? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to keep my script/tools 10.2.2 compatible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2015 17:02:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-the-layer-name-in-the-toc-be-updated-using/m-p/721940#M55881</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2015-08-19T17:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: Can the layer name in the TOC be updated using arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/can-the-layer-name-in-the-toc-be-updated-using/m-p/721941#M55882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok...may have been overthinking this.&amp;nbsp; I think all I needed to do is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lyr.name = lyr.datasetName&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when testing in the .mxd, I need to refresh the mxd/TOC.&amp;nbsp; This will be run in ArcCatalog and will test my script and update soon. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes writing out the question is enough to make the obvious pop out.&amp;nbsp; ugh!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2015 17:09:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-the-layer-name-in-the-toc-be-updated-using/m-p/721941#M55882</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2015-08-19T17:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: Can the layer name in the TOC be updated using arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/can-the-layer-name-in-the-toc-be-updated-using/m-p/721942#M55883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It happens to everyone. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2015 17:17:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-the-layer-name-in-the-toc-be-updated-using/m-p/721942#M55883</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2015-08-19T17:17:16Z</dc:date>
    </item>
  </channel>
</rss>

