<?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 dynamic output features name in ModelBuilder Questions</title>
    <link>https://community.esri.com/t5/modelbuilder-questions/dynamic-output-features-name/m-p/832547#M947</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I am trying to create a script that allows making a loop inside the data set, using each layer inside it to create a specific report, my question is how can I make the name of the output resulting layer as it matches the name of the input layer like %Name% in model builder. the following is the script.&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;... arcpy.env.workspace=r'E:\Drawing_id\drawing.gdb'&lt;BR /&gt;... listdataset=arcpy.ListDatasets("*","feature")&lt;BR /&gt;... listfeature=arcpy.ListFeatureClasses("*","",listdataset)&lt;BR /&gt;... for ds in listdataset:&lt;BR /&gt;... if ds =='potablwater':&lt;BR /&gt;... listfeature=arcpy.ListFeatureClasses("*","",ds)&lt;BR /&gt;... for fc in listfeature:&lt;BR /&gt;... listfield=arcpy.ListFields(fc) &lt;BR /&gt;... for fd in listfield:&lt;BR /&gt;... if 'DRAWINGID' in fd.name: &lt;BR /&gt;... arcpy.Frequency_analysis(fc,r'C:\Users\aaaaa\Documents\ArcGIS\Default.gdb\&lt;SPAN style="text-decoration: underline; color: #ff0000;"&gt;&lt;STRONG&gt;??????&lt;/STRONG&gt;&lt;/SPAN&gt;','DRAWINGID')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Mar 2020 21:16:24 GMT</pubDate>
    <dc:creator>tamerali</dc:creator>
    <dc:date>2020-03-13T21:16:24Z</dc:date>
    <item>
      <title>dynamic output features name</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/dynamic-output-features-name/m-p/832547#M947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I am trying to create a script that allows making a loop inside the data set, using each layer inside it to create a specific report, my question is how can I make the name of the output resulting layer as it matches the name of the input layer like %Name% in model builder. the following is the script.&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;... arcpy.env.workspace=r'E:\Drawing_id\drawing.gdb'&lt;BR /&gt;... listdataset=arcpy.ListDatasets("*","feature")&lt;BR /&gt;... listfeature=arcpy.ListFeatureClasses("*","",listdataset)&lt;BR /&gt;... for ds in listdataset:&lt;BR /&gt;... if ds =='potablwater':&lt;BR /&gt;... listfeature=arcpy.ListFeatureClasses("*","",ds)&lt;BR /&gt;... for fc in listfeature:&lt;BR /&gt;... listfield=arcpy.ListFields(fc) &lt;BR /&gt;... for fd in listfield:&lt;BR /&gt;... if 'DRAWINGID' in fd.name: &lt;BR /&gt;... arcpy.Frequency_analysis(fc,r'C:\Users\aaaaa\Documents\ArcGIS\Default.gdb\&lt;SPAN style="text-decoration: underline; color: #ff0000;"&gt;&lt;STRONG&gt;??????&lt;/STRONG&gt;&lt;/SPAN&gt;','DRAWINGID')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2020 21:16:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/dynamic-output-features-name/m-p/832547#M947</guid>
      <dc:creator>tamerali</dc:creator>
      <dc:date>2020-03-13T21:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic output features name</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/dynamic-output-features-name/m-p/832548#M948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look into the topic of string concatenation. Plenty of examples on the internet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2020 11:32:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/dynamic-output-features-name/m-p/832548#M948</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2020-04-10T11:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic output features name</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/dynamic-output-features-name/m-p/832549#M949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; os
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;  &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;snip&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; fc &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; listfeature&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    listfield&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListFields&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'DRAWINGID'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; listfield&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        out_tbl &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;'C:\Users\aaaaa\Documents\ArcGIS\Default.gdb'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
                      &lt;SPAN class="string token"&gt;"{}_tbl"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Frequency_analysis&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; out_tbl&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'DRAWINGID'&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:03:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/dynamic-output-features-name/m-p/832549#M949</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-12T10:03:57Z</dc:date>
    </item>
  </channel>
</rss>

