<?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 populate field with feature class name in modelbuilder in ModelBuilder Questions</title>
    <link>https://community.esri.com/t5/modelbuilder-questions/populate-field-with-feature-class-name-in/m-p/791247#M107</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am working with modelbuilder to process a large amount of GPS point data. I take GPS points from csv files (each named with their ID number) and string them together to make tracks using the "points to line" tool. Since geodatabase feature classes can't start with numbers, my feature class names look something like "trksp366842960," where MMSI is 366842960, and I want to remove the "trksp." &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Right now, I have added a string field to the tracks feature class called MMSI (the vessel ID number) and I wish to populate this field with the right 9 characters of the feature class name. To start, I would be happy to just populate the MMSI field with the full feature class name. When I try using VBScript and Python, nothing is populated (null) no matter how I call the variable in the tool (e.g., %Name% or selecting from the drop-down). Can anyone give me some guidance on how to move forward? When writing an expression in the calculate field tool, I am unsure of the syntax and how to call the Name variable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 20 Aug 2011 21:20:56 GMT</pubDate>
    <dc:creator>JimmyDobbins</dc:creator>
    <dc:date>2011-08-20T21:20:56Z</dc:date>
    <item>
      <title>populate field with feature class name in modelbuilder</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/populate-field-with-feature-class-name-in/m-p/791247#M107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am working with modelbuilder to process a large amount of GPS point data. I take GPS points from csv files (each named with their ID number) and string them together to make tracks using the "points to line" tool. Since geodatabase feature classes can't start with numbers, my feature class names look something like "trksp366842960," where MMSI is 366842960, and I want to remove the "trksp." &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Right now, I have added a string field to the tracks feature class called MMSI (the vessel ID number) and I wish to populate this field with the right 9 characters of the feature class name. To start, I would be happy to just populate the MMSI field with the full feature class name. When I try using VBScript and Python, nothing is populated (null) no matter how I call the variable in the tool (e.g., %Name% or selecting from the drop-down). Can anyone give me some guidance on how to move forward? When writing an expression in the calculate field tool, I am unsure of the syntax and how to call the Name variable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Aug 2011 21:20:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/populate-field-with-feature-class-name-in/m-p/791247#M107</guid>
      <dc:creator>JimmyDobbins</dc:creator>
      <dc:date>2011-08-20T21:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: populate field with feature class name in modelbuilder</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/populate-field-with-feature-class-name-in/m-p/791248#M108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Okay, I figured it out...I needed to place the variable name in double quotes as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"%Name%"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To get rid of the trksp in front of the ID number, I used "%Name%"[6:] to get everything from position 6 on.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Aug 2011 17:53:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/populate-field-with-feature-class-name-in/m-p/791248#M108</guid>
      <dc:creator>JimmyDobbins</dc:creator>
      <dc:date>2011-08-21T17:53:29Z</dc:date>
    </item>
  </channel>
</rss>

