<?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: CatalogPath for map Layer Different in Pro vs. Desktop in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/catalogpath-for-map-layer-different-in-pro-vs/m-p/1368939#M69630</link>
    <description>&lt;P&gt;Thanks for the reply.&amp;nbsp; I do not want the strange temp directory that ArcGIS Pro provides for a feature layer, I want the actual source where the data is referenced.&amp;nbsp; The main point is the script is not giving me the 'catalogPath' like it describes, I am not storing my features in a temp folder.&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jan 2024 15:20:32 GMT</pubDate>
    <dc:creator>EvanMyers1</dc:creator>
    <dc:date>2024-01-11T15:20:32Z</dc:date>
    <item>
      <title>CatalogPath for map Layer Different in Pro vs. Desktop</title>
      <link>https://community.esri.com/t5/python-questions/catalogpath-for-map-layer-different-in-pro-vs/m-p/1368860#M69626</link>
      <description>&lt;P&gt;In ArcMap Desktop, I have this code to find the geodatabase/sde of a layer in my map:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;abPoly = 'wGISProd.WUD.Asbuilt_Polygons'
desc = arcpy.Describe(abPoly)
workspace = os.path.dirname(desc.catalogPath)
sde = arcpy.Describe(workspace)
if hasattr(sde, "datasetType") and sde.datasetType == 'FeatureDataset':
    workspace = os.path.dirname(workspace)
print(workspace)
W:\\GIS\\Database Connections\\GISdb_wGISProd.OSA.sde&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, in ArcGIS Pro, I use the same code but get different results:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;abPoly = 'wGISProd.WUD.Asbuilt_Polygons'
desc = arcpy.Describe(abPoly)
workspace = os.path.dirname(desc.catalogPath)
sde = arcpy.Describe(workspace)
if hasattr(sde, "datasetType") and sde.datasetType == 'FeatureDataset':
    workspace = os.path.dirname(workspace)
print(workspace)
C:\Users\emyers\AppData\Local\Temp\ArcGISProTemp18060\452cb8e506fc2ab239912c037c1cb7fb.sde&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I get the result in Desktop into Pro?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 13:22:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/catalogpath-for-map-layer-different-in-pro-vs/m-p/1368860#M69626</guid>
      <dc:creator>EvanMyers1</dc:creator>
      <dc:date>2024-01-11T13:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: CatalogPath for map Layer Different in Pro vs. Desktop</title>
      <link>https://community.esri.com/t5/python-questions/catalogpath-for-map-layer-different-in-pro-vs/m-p/1368936#M69629</link>
      <description>&lt;P&gt;I use Describe&amp;nbsp;catalogPath and I'm able to build a path to a different feature class in that workspace. What isn't working?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 15:12:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/catalogpath-for-map-layer-different-in-pro-vs/m-p/1368936#M69629</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2024-01-11T15:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: CatalogPath for map Layer Different in Pro vs. Desktop</title>
      <link>https://community.esri.com/t5/python-questions/catalogpath-for-map-layer-different-in-pro-vs/m-p/1368939#M69630</link>
      <description>&lt;P&gt;Thanks for the reply.&amp;nbsp; I do not want the strange temp directory that ArcGIS Pro provides for a feature layer, I want the actual source where the data is referenced.&amp;nbsp; The main point is the script is not giving me the 'catalogPath' like it describes, I am not storing my features in a temp folder.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 15:20:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/catalogpath-for-map-layer-different-in-pro-vs/m-p/1368939#M69630</guid>
      <dc:creator>EvanMyers1</dc:creator>
      <dc:date>2024-01-11T15:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: CatalogPath for map Layer Different in Pro vs. Desktop</title>
      <link>https://community.esri.com/t5/python-questions/catalogpath-for-map-layer-different-in-pro-vs/m-p/1368944#M69632</link>
      <description>&lt;P&gt;I can't find the documentation, but I recall that ArcGIS Pro does not store the raw path to SDE connections like ArcMap did. The "strange temp directory" is the best you're going to get.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 15:30:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/catalogpath-for-map-layer-different-in-pro-vs/m-p/1368944#M69632</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2024-01-11T15:30:01Z</dc:date>
    </item>
  </channel>
</rss>

