<?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 Filtering Simple Edge in Python toolbox in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/filtering-simple-edge-in-python-toolbox/m-p/1010842#M59317</link>
    <description>&lt;P&gt;I am writing a Python toolbox. I have an input parameter which should accept a Simple Edge (part of Geometric Network) or a polyline feature class (no edge).&lt;/P&gt;&lt;P&gt;How can I use the Filter list so it can see both Simple Edge and Polyline feature class types? It looks like the filter doesn't work with simple edge.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;param2 = arcpy.Parameter(&lt;BR /&gt;    &lt;SPAN&gt;displayName&lt;/SPAN&gt;=&lt;SPAN&gt;"Gravity Main Links"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;name&lt;/SPAN&gt;=&lt;SPAN&gt;"fcLink"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;datatype&lt;/SPAN&gt;=&lt;SPAN&gt;"DEFeatureClass"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;parameterType&lt;/SPAN&gt;=&lt;SPAN&gt;"Required"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;direction&lt;/SPAN&gt;=&lt;SPAN&gt;"Input"&lt;/SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# if I comment out this line it sees the simple edge &lt;BR /&gt;# but it shows all types of feature classes. I just need to see &lt;/SPAN&gt;polylines&lt;BR /&gt;&lt;SPAN&gt;param2.filter.list = ["Polyline"]  &lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Dec 2020 02:36:12 GMT</pubDate>
    <dc:creator>AzinSharaf</dc:creator>
    <dc:date>2020-12-18T02:36:12Z</dc:date>
    <item>
      <title>Filtering Simple Edge in Python toolbox</title>
      <link>https://community.esri.com/t5/python-questions/filtering-simple-edge-in-python-toolbox/m-p/1010842#M59317</link>
      <description>&lt;P&gt;I am writing a Python toolbox. I have an input parameter which should accept a Simple Edge (part of Geometric Network) or a polyline feature class (no edge).&lt;/P&gt;&lt;P&gt;How can I use the Filter list so it can see both Simple Edge and Polyline feature class types? It looks like the filter doesn't work with simple edge.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;param2 = arcpy.Parameter(&lt;BR /&gt;    &lt;SPAN&gt;displayName&lt;/SPAN&gt;=&lt;SPAN&gt;"Gravity Main Links"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;name&lt;/SPAN&gt;=&lt;SPAN&gt;"fcLink"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;datatype&lt;/SPAN&gt;=&lt;SPAN&gt;"DEFeatureClass"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;parameterType&lt;/SPAN&gt;=&lt;SPAN&gt;"Required"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;direction&lt;/SPAN&gt;=&lt;SPAN&gt;"Input"&lt;/SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# if I comment out this line it sees the simple edge &lt;BR /&gt;# but it shows all types of feature classes. I just need to see &lt;/SPAN&gt;polylines&lt;BR /&gt;&lt;SPAN&gt;param2.filter.list = ["Polyline"]  &lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 02:36:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/filtering-simple-edge-in-python-toolbox/m-p/1010842#M59317</guid>
      <dc:creator>AzinSharaf</dc:creator>
      <dc:date>2020-12-18T02:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Simple Edge in Python toolbox</title>
      <link>https://community.esri.com/t5/python-questions/filtering-simple-edge-in-python-toolbox/m-p/1010844#M59319</link>
      <description>&lt;P&gt;You have simple edge in featureclasses as a featuretype&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/featureclass-properties.htm" target="_blank"&gt;FeatureClass properties—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 02:49:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/filtering-simple-edge-in-python-toolbox/m-p/1010844#M59319</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-12-18T02:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Simple Edge in Python toolbox</title>
      <link>https://community.esri.com/t5/python-questions/filtering-simple-edge-in-python-toolbox/m-p/1011502#M59351</link>
      <description>&lt;P&gt;Thank you for the response but how can it be used as Filter Type? I don't see any option for simple edge in filter type.&lt;/P&gt;&lt;P&gt;&lt;A title="Applying filters to a parameter" href="https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/defining-parameters-in-a-python-toolbox.htm#GUID-3CB5FAF4-43DD-4C84-8AFE-08039A72B3E0" target="_blank" rel="noopener"&gt;Applying filters to a parameter&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 17:44:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/filtering-simple-edge-in-python-toolbox/m-p/1011502#M59351</guid>
      <dc:creator>AzinSharaf</dc:creator>
      <dc:date>2020-12-21T17:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Simple Edge in Python toolbox</title>
      <link>https://community.esri.com/t5/python-questions/filtering-simple-edge-in-python-toolbox/m-p/1011544#M59356</link>
      <description>&lt;P&gt;Test for its type&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy
fc = r"C:\arcpro_npg\npg\Project_npg\npgeom.gdb\Polylines"
desc = arcpy.da.Describe(fc)
fc_type = desc['featureType']

if fc_type == 'Simple':
    print("do stuff")
else:
    print("not the right type")
    
do stuff

if fc_type == 'SimpleEdge':
    print("do stuff")
else:
    print("not the right type")
    
not the right type&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 21 Dec 2020 19:07:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/filtering-simple-edge-in-python-toolbox/m-p/1011544#M59356</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-12-21T19:07:56Z</dc:date>
    </item>
  </channel>
</rss>

