<?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: Simple test to check if returned value is a geometry object in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/simple-test-to-check-if-returned-value-is-a/m-p/1178193#M55619</link>
    <description>&lt;P&gt;The value you compare it to should be a type, not a string.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;if type(value) in (arcpy.Polygon, arcpy.Point, arcpy.Polyline, arcpy.Multipoint):
    arcpy.DoSomething(...)&lt;/LI-CODE&gt;&lt;P&gt;It'd be nice if &lt;FONT face="courier new,courier"&gt;type(value) is arcpy.Geometry&lt;/FONT&gt; returned True, but sadly it doesn't.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 29 May 2022 05:33:11 GMT</pubDate>
    <dc:creator>Luke_Pinner</dc:creator>
    <dc:date>2022-05-29T05:33:11Z</dc:date>
    <item>
      <title>Simple test to check if returned value is a geometry object</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/simple-test-to-check-if-returned-value-is-a/m-p/1178191#M55618</link>
      <description>&lt;P&gt;I gave it a whirl but I can't seem to figure out the particular expression to test if the given variable is a geometry object (as if you had run a searchcursor for "Shape@"). I'm mostly just concerned with detecting that's it's a geometry object and not of what type (line, polyline, etc). I've tried things to the effect of:&lt;/P&gt;&lt;P&gt;if type(value) == 'arcpy.arcobjects.geometries.Polyline' (or 'Polyline' or 'arcpy.arcobjects.arcobjects.Geometry')&lt;/P&gt;&lt;P&gt;What's the magic word I'm looking for, for the right side of that expression?&lt;/P&gt;</description>
      <pubDate>Sun, 29 May 2022 04:38:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/simple-test-to-check-if-returned-value-is-a/m-p/1178191#M55618</guid>
      <dc:creator>Glasnoct</dc:creator>
      <dc:date>2022-05-29T04:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Simple test to check if returned value is a geometry object</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/simple-test-to-check-if-returned-value-is-a/m-p/1178193#M55619</link>
      <description>&lt;P&gt;The value you compare it to should be a type, not a string.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;if type(value) in (arcpy.Polygon, arcpy.Point, arcpy.Polyline, arcpy.Multipoint):
    arcpy.DoSomething(...)&lt;/LI-CODE&gt;&lt;P&gt;It'd be nice if &lt;FONT face="courier new,courier"&gt;type(value) is arcpy.Geometry&lt;/FONT&gt; returned True, but sadly it doesn't.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 May 2022 05:33:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/simple-test-to-check-if-returned-value-is-a/m-p/1178193#M55619</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2022-05-29T05:33:11Z</dc:date>
    </item>
  </channel>
</rss>

