<?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: Using ParsePath with Layers - Can you get 'real' file name? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/using-parsepath-with-layers-can-you-get-real-file/m-p/1362166#M76503</link>
    <description>&lt;P&gt;Hi Randy,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a suggestion:&lt;/P&gt;&lt;P&gt;Instead of using Parse Path, you could try using something like this with Calculate Value:&lt;/P&gt;&lt;P&gt;Expression: FileName&lt;/P&gt;&lt;P&gt;Code Block:&lt;/P&gt;&lt;P&gt;LayerInput = '%LayerInput%'&lt;/P&gt;&lt;P&gt;desc = arcpy.Describe(LayerInput)&lt;/P&gt;&lt;P&gt;FileName = desc.baseName&lt;/P&gt;&lt;P&gt;The resulting Value should be the name of your actual file name.&lt;/P&gt;&lt;P&gt;Depending on your needs, you could change baseName to these other options available:&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/3.1/arcpy/functions/describe-object-properties.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/3.1/arcpy/functions/describe-object-properties.htm&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Dec 2023 18:42:12 GMT</pubDate>
    <dc:creator>cpehlke</dc:creator>
    <dc:date>2023-12-18T18:42:12Z</dc:date>
    <item>
      <title>Using ParsePath with Layers - Can you get 'real' file name?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/using-parsepath-with-layers-can-you-get-real-file/m-p/1362021#M76487</link>
      <description>&lt;P&gt;I am using 'ParsePath' in a model and for 'Name' it returns whatever layer name I have given the layer in the TOC and for 'Path' it returns the group the layer is in (if it is in one). This is not helpful.&lt;/P&gt;&lt;P&gt;I would like to get the real file name - ie. DataPoints, not 'Points Collected in the field on 12/13/2023'&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the user selects the file on disk, this problem is solved, but I'd rather have the convenience of pulling the layer in from the table of contents.&lt;/P&gt;&lt;P&gt;Is it possible with ParsePath to get the 'actual' file information? This can be done with Python, and I may make a Python tool, but just wondering of ModelBuilder ParsePath can work here.&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Randy McGregor&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 15:22:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/using-parsepath-with-layers-can-you-get-real-file/m-p/1362021#M76487</guid>
      <dc:creator>RandyMcGregor_BMcD</dc:creator>
      <dc:date>2023-12-18T15:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using ParsePath with Layers - Can you get 'real' file name?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/using-parsepath-with-layers-can-you-get-real-file/m-p/1362166#M76503</link>
      <description>&lt;P&gt;Hi Randy,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a suggestion:&lt;/P&gt;&lt;P&gt;Instead of using Parse Path, you could try using something like this with Calculate Value:&lt;/P&gt;&lt;P&gt;Expression: FileName&lt;/P&gt;&lt;P&gt;Code Block:&lt;/P&gt;&lt;P&gt;LayerInput = '%LayerInput%'&lt;/P&gt;&lt;P&gt;desc = arcpy.Describe(LayerInput)&lt;/P&gt;&lt;P&gt;FileName = desc.baseName&lt;/P&gt;&lt;P&gt;The resulting Value should be the name of your actual file name.&lt;/P&gt;&lt;P&gt;Depending on your needs, you could change baseName to these other options available:&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/3.1/arcpy/functions/describe-object-properties.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/3.1/arcpy/functions/describe-object-properties.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 18:42:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/using-parsepath-with-layers-can-you-get-real-file/m-p/1362166#M76503</guid>
      <dc:creator>cpehlke</dc:creator>
      <dc:date>2023-12-18T18:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using ParsePath with Layers - Can you get 'real' file name?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/using-parsepath-with-layers-can-you-get-real-file/m-p/1362620#M76545</link>
      <description>&lt;P&gt;Thank you! That worked. I appreciate it. Ended up looking like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RandyMcGregor_BMcD_0-1703004557316.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/89511i90999A4AC19279C8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RandyMcGregor_BMcD_0-1703004557316.png" alt="RandyMcGregor_BMcD_0-1703004557316.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 20:45:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/using-parsepath-with-layers-can-you-get-real-file/m-p/1362620#M76545</guid>
      <dc:creator>RandyMcGregor_BMcD</dc:creator>
      <dc:date>2024-01-09T20:45:27Z</dc:date>
    </item>
  </channel>
</rss>

