<?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: Iterating through a Geodatabase using a script to identify feature class names in ModelBuilder Questions</title>
    <link>https://community.esri.com/t5/modelbuilder-questions/re-iterating-through-a-geodatabase-using-a-script/m-p/809118#M2431</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;So I tried your suggestion and I am receiving the following error:&amp;nbsp;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/363836_pastedImage_1.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Here is my model stripped down to one line, from 44, (the full model tests each layer name for 44 possible names so that the correct symbology can be applied):&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/363837_pastedImage_2.png" style="width: 620px; height: 175px;" /&gt;&lt;/P&gt;&lt;P&gt;And my script in Calculate Value to identify the names of the input feature classes in order to determine the correct symbology:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/363838_pastedImage_3.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Jul 2017 18:15:18 GMT</pubDate>
    <dc:creator>MattDeveney</dc:creator>
    <dc:date>2017-07-21T18:15:18Z</dc:date>
    <item>
      <title>Re: Iterating through a Geodatabase using a script to identify feature class names</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/re-iterating-through-a-geodatabase-using-a-script/m-p/809117#M2430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Get rid of your existing Name check script tool.&lt;/LI&gt;&lt;LI&gt;Connect you featureclass created by the iterator to all 3 make featurelayer tools.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Use the model only Calculate Value tool with your code and make that a precondition to the make featurelayer tool. You would have 3 Calculate Value tools 1 for each make feature layer tool, all acting as preconditions, each testing for a &lt;EM&gt;specific&lt;/EM&gt; name.&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jul 2017 11:32:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/re-iterating-through-a-geodatabase-using-a-script/m-p/809117#M2430</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2017-07-11T11:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through a Geodatabase using a script to identify feature class names</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/re-iterating-through-a-geodatabase-using-a-script/m-p/809118#M2431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;So I tried your suggestion and I am receiving the following error:&amp;nbsp;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/363836_pastedImage_1.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Here is my model stripped down to one line, from 44, (the full model tests each layer name for 44 possible names so that the correct symbology can be applied):&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/363837_pastedImage_2.png" style="width: 620px; height: 175px;" /&gt;&lt;/P&gt;&lt;P&gt;And my script in Calculate Value to identify the names of the input feature classes in order to determine the correct symbology:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/363838_pastedImage_3.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2017 18:15:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/re-iterating-through-a-geodatabase-using-a-script/m-p/809118#M2431</guid>
      <dc:creator>MattDeveney</dc:creator>
      <dc:date>2017-07-21T18:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through a Geodatabase using a script to identify feature class names</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/re-iterating-through-a-geodatabase-using-a-script/m-p/809119#M2432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you can simplify further, if your symbology layer files named the same as your feature class names? Connect the model element&amp;nbsp;&lt;EM&gt;Name&lt;/EM&gt; to the Make Feature Layer tool layer Name parameter, for the Save To Layer file tool specify the output as:&lt;STRONG&gt; %Name%_sym.lyr&lt;/STRONG&gt;. Put your pre-symbolized layer files in a folder (create a Folder variable &lt;EM&gt;Symbology Folder&lt;/EM&gt; to point to this folder of .lyr files), and supply the path to them&amp;nbsp;as input to the Apply Symbology From Layer tool (you should need only one, not 44) using this syntax:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;%&lt;/SPAN&gt;Symbology Folder&lt;SPAN class="operator token"&gt;%&lt;/SPAN&gt;\&lt;SPAN class="operator token"&gt;%&lt;/SPAN&gt;Name&lt;SPAN class="operator token"&gt;%&lt;/SPAN&gt;_sym&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;lyr‍‍‍‍‍&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;This approach avoids your 44 chains with preconditions, you can just construct the paths directly on each iteration as needed, all in one processing chain.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jul 2017 22:59:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/re-iterating-through-a-geodatabase-using-a-script/m-p/809119#M2432</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2017-07-24T22:59:09Z</dc:date>
    </item>
  </channel>
</rss>

