<?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: ArcGIS Pro 2.3 - How to truncate feature class with Calculate Value in ModelBuiler? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-3-how-to-truncate-feature-class-with/m-p/132424#M10274</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you issue is you need to pass a raw string to preserve the path delimeter:&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;fn&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;"%FullPath%"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUT: I suggest using the &lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/modelbuilder-toolbox/parse-path-ext.htm"&gt;Parse Path&lt;/A&gt;&amp;nbsp;tool, or, if you still want to use Python,&amp;nbsp;instead of string searches I recommend the functions in the os.path module: os.path.basename() and os.path.dirname().&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Feb 2019 04:46:49 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2019-02-27T04:46:49Z</dc:date>
    <item>
      <title>ArcGIS Pro 2.3 - How to truncate feature class with Calculate Value in ModelBuiler?</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-3-how-to-truncate-feature-class-with/m-p/132423#M10273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using Calculate Value in Model Builder in ArcGIS Pro 2.3 in order to truncate a feature class full name and keep only the feature class name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following piece of code do not work. It looks like Python is not parsing my inline variable because there is some backslash \ character...&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/438153_Calculate_Value.png" /&gt;&lt;/P&gt;&lt;P&gt;where "fullPath" is the in-line variable I am passing in and the backslash \ is to truncate the feature class proper name to the rest of the path&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2019 16:23:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-2-3-how-to-truncate-feature-class-with/m-p/132423#M10273</guid>
      <dc:creator>VincentLaunstorfer</dc:creator>
      <dc:date>2019-02-26T16:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro 2.3 - How to truncate feature class with Calculate Value in ModelBuiler?</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-3-how-to-truncate-feature-class-with/m-p/132424#M10274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you issue is you need to pass a raw string to preserve the path delimeter:&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;fn&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;"%FullPath%"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUT: I suggest using the &lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/modelbuilder-toolbox/parse-path-ext.htm"&gt;Parse Path&lt;/A&gt;&amp;nbsp;tool, or, if you still want to use Python,&amp;nbsp;instead of string searches I recommend the functions in the os.path module: os.path.basename() and os.path.dirname().&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2019 04:46:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-2-3-how-to-truncate-feature-class-with/m-p/132424#M10274</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2019-02-27T04:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro 2.3 - How to truncate feature class with Calculate Value in ModelBuiler?</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-3-how-to-truncate-feature-class-with/m-p/132425#M10275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. It is perfect!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Parse Path tool help even gives syntax to work with os module directly in Python.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In ModelBuilder, the Parse Path tool is in the Uilities menu on the toolbar (and not in the toolbox) if anybody was looking for it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/438225_Parse.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2019 08:22:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-2-3-how-to-truncate-feature-class-with/m-p/132425#M10275</guid>
      <dc:creator>VincentLaunstorfer</dc:creator>
      <dc:date>2019-02-27T08:22:34Z</dc:date>
    </item>
  </channel>
</rss>

