<?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 Renaming SDE breaks the path of Saved MXD in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/renaming-sde-breaks-the-path-of-saved-mxd/m-p/102003#M7890</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I have created a python add-in. This tool abandons the selected feature(s) to it's abandoning feature class. I read the path of the layer and create the path of the abanond&amp;nbsp;layer in the following way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mxd&amp;nbsp;= arcpy.mapping.MapDocumnet("CURRENT") # Working on Current Map&lt;/P&gt;&lt;P&gt;lyr = arcpy.mapping.ListLayers(mxd)[0] # Reading the first layer object&amp;nbsp;&lt;/P&gt;&lt;P&gt;lyr_src = lyr.dataSource # Getting the path of the layer&lt;/P&gt;&lt;P&gt;abandon_layer = lyr_src+"\AbandonLayer"&amp;nbsp; # AbandonLayer path since, Abandon layer stays in same feature dataset in my situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, Whenever I rename the SDE(database connection) in ArcCatalog I am not getting the updated path of SDE.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note: lyr_src variable still shows the old path only. Hence, I am not getting&amp;nbsp;my feature class to perform the operation. Even though I am refreshing ArcMap, ArcCatalog, Active view it's not helping me.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Conclusion: I know that path is breaking&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please, give me an idea. How to handle this situation&amp;nbsp;automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your time&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Aug 2018 06:28:26 GMT</pubDate>
    <dc:creator>JAY_PRAKASHKUMAR</dc:creator>
    <dc:date>2018-08-07T06:28:26Z</dc:date>
    <item>
      <title>Renaming SDE breaks the path of Saved MXD</title>
      <link>https://community.esri.com/t5/python-questions/renaming-sde-breaks-the-path-of-saved-mxd/m-p/102003#M7890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I have created a python add-in. This tool abandons the selected feature(s) to it's abandoning feature class. I read the path of the layer and create the path of the abanond&amp;nbsp;layer in the following way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mxd&amp;nbsp;= arcpy.mapping.MapDocumnet("CURRENT") # Working on Current Map&lt;/P&gt;&lt;P&gt;lyr = arcpy.mapping.ListLayers(mxd)[0] # Reading the first layer object&amp;nbsp;&lt;/P&gt;&lt;P&gt;lyr_src = lyr.dataSource # Getting the path of the layer&lt;/P&gt;&lt;P&gt;abandon_layer = lyr_src+"\AbandonLayer"&amp;nbsp; # AbandonLayer path since, Abandon layer stays in same feature dataset in my situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, Whenever I rename the SDE(database connection) in ArcCatalog I am not getting the updated path of SDE.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note: lyr_src variable still shows the old path only. Hence, I am not getting&amp;nbsp;my feature class to perform the operation. Even though I am refreshing ArcMap, ArcCatalog, Active view it's not helping me.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Conclusion: I know that path is breaking&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please, give me an idea. How to handle this situation&amp;nbsp;automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your time&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2018 06:28:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/renaming-sde-breaks-the-path-of-saved-mxd/m-p/102003#M7890</guid>
      <dc:creator>JAY_PRAKASHKUMAR</dc:creator>
      <dc:date>2018-08-07T06:28:26Z</dc:date>
    </item>
  </channel>
</rss>

