<?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 How to tell what type of Element an element is? in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/how-to-tell-what-type-of-element-an-element-is/m-p/1540201#M7306</link>
    <description>&lt;P&gt;I am having a user select an element, and I need to be sure it is a polygon element before I label it.&amp;nbsp; I know you can check to see if it is a TextElement, but I don't see any other type of element that you can check for?&amp;nbsp; When it is created programmatically, you will only add the geometry to a GraphicElement, CIMGraphicElement, or just Element.&amp;nbsp; There is no specific type of element for Polygon, Point, etc. that can be checked, as far as I can tell.&amp;nbsp; In ArcObjects there were all sorts of element types.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see in the Element class there is an internal typecalled LayoutElementType that contains the information I am after (This is not exposed, I am only looking inside of the definition of Element from the 3.3 SDK):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;switch (ElementType)&lt;BR /&gt;{&lt;BR /&gt;case LayoutElementType.Line:&lt;BR /&gt;case LayoutElementType.BezierCurve:&lt;BR /&gt;case LayoutElementType.OpenLasso:&lt;BR /&gt;case LayoutElementType.Polygon:&lt;BR /&gt;case LayoutElementType.Rectangle:&lt;BR /&gt;case LayoutElementType.Circle:&lt;BR /&gt;case LayoutElementType.Ellipse:&lt;BR /&gt;case LayoutElementType.Lasso:&lt;BR /&gt;case LayoutElementType.Triangle:&lt;BR /&gt;case LayoutElementType.RightTriangle:&lt;BR /&gt;case LayoutElementType.Cross:&lt;BR /&gt;case LayoutElementType.X:&lt;BR /&gt;case LayoutElementType.RoundedRectangle:&lt;BR /&gt;case LayoutElementType.Arc:&lt;BR /&gt;case LayoutElementType.HalfCircle:&lt;BR /&gt;case LayoutElementType.Cloud:&lt;BR /&gt;case LayoutElementType.OneSidedLinearArrow:&lt;BR /&gt;case LayoutElementType.TwoSidedLinearArrow:&lt;BR /&gt;case LayoutElementType.OneSidedCurvedArrow:&lt;BR /&gt;case LayoutElementType.TwoSidedCurvedArrow:&lt;BR /&gt;case LayoutElementType.OneSidedBlockArrow:&lt;BR /&gt;case LayoutElementType.TwoSidedBlockArrow:&lt;BR /&gt;case LayoutElementType.SplinedText:&lt;BR /&gt;case LayoutElementType.PolygonParagraph:&lt;BR /&gt;case LayoutElementType.RectangleParagraph:&lt;BR /&gt;case LayoutElementType.CircleParagraph:&lt;BR /&gt;case LayoutElementType.EllipseParagraph:&lt;BR /&gt;case LayoutElementType.PolygonMapFrame:&lt;BR /&gt;case LayoutElementType.RectangleMapFrame:&lt;BR /&gt;case LayoutElementType.CircleMapFrame:&lt;BR /&gt;case LayoutElementType.EllipseMapFrame:&lt;BR /&gt;return true;&lt;BR /&gt;default:&lt;BR /&gt;return false;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I missed anything please let me know!&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 18 Sep 2024 23:14:41 GMT</pubDate>
    <dc:creator>JeremyWiles</dc:creator>
    <dc:date>2024-09-18T23:14:41Z</dc:date>
    <item>
      <title>How to tell what type of Element an element is?</title>
      <link>https://community.esri.com/t5/developers-questions/how-to-tell-what-type-of-element-an-element-is/m-p/1540201#M7306</link>
      <description>&lt;P&gt;I am having a user select an element, and I need to be sure it is a polygon element before I label it.&amp;nbsp; I know you can check to see if it is a TextElement, but I don't see any other type of element that you can check for?&amp;nbsp; When it is created programmatically, you will only add the geometry to a GraphicElement, CIMGraphicElement, or just Element.&amp;nbsp; There is no specific type of element for Polygon, Point, etc. that can be checked, as far as I can tell.&amp;nbsp; In ArcObjects there were all sorts of element types.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see in the Element class there is an internal typecalled LayoutElementType that contains the information I am after (This is not exposed, I am only looking inside of the definition of Element from the 3.3 SDK):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;switch (ElementType)&lt;BR /&gt;{&lt;BR /&gt;case LayoutElementType.Line:&lt;BR /&gt;case LayoutElementType.BezierCurve:&lt;BR /&gt;case LayoutElementType.OpenLasso:&lt;BR /&gt;case LayoutElementType.Polygon:&lt;BR /&gt;case LayoutElementType.Rectangle:&lt;BR /&gt;case LayoutElementType.Circle:&lt;BR /&gt;case LayoutElementType.Ellipse:&lt;BR /&gt;case LayoutElementType.Lasso:&lt;BR /&gt;case LayoutElementType.Triangle:&lt;BR /&gt;case LayoutElementType.RightTriangle:&lt;BR /&gt;case LayoutElementType.Cross:&lt;BR /&gt;case LayoutElementType.X:&lt;BR /&gt;case LayoutElementType.RoundedRectangle:&lt;BR /&gt;case LayoutElementType.Arc:&lt;BR /&gt;case LayoutElementType.HalfCircle:&lt;BR /&gt;case LayoutElementType.Cloud:&lt;BR /&gt;case LayoutElementType.OneSidedLinearArrow:&lt;BR /&gt;case LayoutElementType.TwoSidedLinearArrow:&lt;BR /&gt;case LayoutElementType.OneSidedCurvedArrow:&lt;BR /&gt;case LayoutElementType.TwoSidedCurvedArrow:&lt;BR /&gt;case LayoutElementType.OneSidedBlockArrow:&lt;BR /&gt;case LayoutElementType.TwoSidedBlockArrow:&lt;BR /&gt;case LayoutElementType.SplinedText:&lt;BR /&gt;case LayoutElementType.PolygonParagraph:&lt;BR /&gt;case LayoutElementType.RectangleParagraph:&lt;BR /&gt;case LayoutElementType.CircleParagraph:&lt;BR /&gt;case LayoutElementType.EllipseParagraph:&lt;BR /&gt;case LayoutElementType.PolygonMapFrame:&lt;BR /&gt;case LayoutElementType.RectangleMapFrame:&lt;BR /&gt;case LayoutElementType.CircleMapFrame:&lt;BR /&gt;case LayoutElementType.EllipseMapFrame:&lt;BR /&gt;return true;&lt;BR /&gt;default:&lt;BR /&gt;return false;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I missed anything please let me know!&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 23:14:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/how-to-tell-what-type-of-element-an-element-is/m-p/1540201#M7306</guid>
      <dc:creator>JeremyWiles</dc:creator>
      <dc:date>2024-09-18T23:14:41Z</dc:date>
    </item>
  </channel>
</rss>

