<?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 Listing Feature Classes Multiple Feature type Using arcpy.ListFeatureClasses in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/listing-feature-classes-multiple-feature-type/m-p/498362#M39118</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi everyone&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;is there a way to use arcpy.ListFeatureClasses() to filter multiple feature types. i.e. Only list the polygon and point feature types in the geaodatabase.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; I've tried something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;arcpy.ListFeatureClasses("*", ["Point", "Polygon"])&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but this still returns all feature types (i.e. annotation and line FC's still get returned)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this possible?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Feb 2012 16:54:36 GMT</pubDate>
    <dc:creator>MikeMacRae</dc:creator>
    <dc:date>2012-02-03T16:54:36Z</dc:date>
    <item>
      <title>Listing Feature Classes Multiple Feature type Using arcpy.ListFeatureClasses</title>
      <link>https://community.esri.com/t5/python-questions/listing-feature-classes-multiple-feature-type/m-p/498362#M39118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi everyone&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;is there a way to use arcpy.ListFeatureClasses() to filter multiple feature types. i.e. Only list the polygon and point feature types in the geaodatabase.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; I've tried something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;arcpy.ListFeatureClasses("*", ["Point", "Polygon"])&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but this still returns all feature types (i.e. annotation and line FC's still get returned)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this possible?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2012 16:54:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listing-feature-classes-multiple-feature-type/m-p/498362#M39118</guid>
      <dc:creator>MikeMacRae</dc:creator>
      <dc:date>2012-02-03T16:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Listing Feature Classes Multiple Feature type Using arcpy.ListFeatureClasses</title>
      <link>https://community.esri.com/t5/python-questions/listing-feature-classes-multiple-feature-type/m-p/498363#M39119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't know if it's possible to ask for two feature types at once. I'd just run through it twice and then append the results.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy

workspace = "H:/GIS_Data/TEMP.gdb"
arcpy.env.workspace = workspace # set workspace

pointfcs = arcpy.ListFeatureClasses('*', 'POINT') # get the points
polyfcs = arcpy.ListFeatureClasses('*', 'POLYGON') # get the polygons

pointfcs.extend(polyfcs) # smash together&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:53:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listing-feature-classes-multiple-feature-type/m-p/498363#M39119</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T21:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Listing Feature Classes Multiple Feature type Using arcpy.ListFeatureClasses</title>
      <link>https://community.esri.com/t5/python-questions/listing-feature-classes-multiple-feature-type/m-p/498364#M39120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for testing Darren. I just discovered a bit of a work-around using the arcpy.Describe() method. Something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import arcpy
from arcpy import env

env.workspace = "Z:\GIS\TEMP.gdb

fcList = arcpy.ListFeatureClasses()

for fc in fcList:
&amp;nbsp;&amp;nbsp; desc = arcpy.Describe(fc)
&amp;nbsp;&amp;nbsp; if desc.shapeType == "Polygon" or "Point":
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print fc

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:53:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listing-feature-classes-multiple-feature-type/m-p/498364#M39120</guid>
      <dc:creator>MikeMacRae</dc:creator>
      <dc:date>2021-12-11T21:53:49Z</dc:date>
    </item>
  </channel>
</rss>

