<?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 Featurelayer to Geometry in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/featurelayer-to-geometry/m-p/343174#M9027</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In c# .net how to I get the geometry of a feature layer using arcobjects? Its probably simple but i'm new to this. I tried to cast to it but i didn't work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; below is a quick sample.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; IFeatureClass pEventFC;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; pName = (IName) pRESN;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; pEventFC = (IFeatureClass) pName.Open();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IActiveView pActive;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; pFLayer = new FeatureLayerClass();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; pFLayer.FeatureClass = pEventFC;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IGeometry pGeom;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pGeom = (IGeometry)pFlayer&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any clues?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Mar 2012 18:56:57 GMT</pubDate>
    <dc:creator>jamesborris</dc:creator>
    <dc:date>2012-03-01T18:56:57Z</dc:date>
    <item>
      <title>Featurelayer to Geometry</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/featurelayer-to-geometry/m-p/343174#M9027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In c# .net how to I get the geometry of a feature layer using arcobjects? Its probably simple but i'm new to this. I tried to cast to it but i didn't work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; below is a quick sample.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; IFeatureClass pEventFC;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; pName = (IName) pRESN;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; pEventFC = (IFeatureClass) pName.Open();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IActiveView pActive;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; pFLayer = new FeatureLayerClass();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; pFLayer.FeatureClass = pEventFC;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IGeometry pGeom;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pGeom = (IGeometry)pFlayer&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any clues?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 18:56:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/featurelayer-to-geometry/m-p/343174#M9027</guid>
      <dc:creator>jamesborris</dc:creator>
      <dc:date>2012-03-01T18:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: Featurelayer to Geometry</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/featurelayer-to-geometry/m-p/343175#M9028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;A feature layer doesn't have a geometry.&amp;nbsp; A feature layer contains features, each of which have a geometry.&amp;nbsp; You can get the features from a feature layer via a query.&amp;nbsp; The query can be an attribute query or a spatial query.&amp;nbsp; Here is one example.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Dim featureCursor As IFeatureCursor = featureLayer.FeatureClass.Search(Nothing, False) Dim feature As IFeature = featureCursor.NextFeature Do While feature IsNot Nothing &amp;nbsp;&amp;nbsp;&amp;nbsp; Dim geometry As IGeometry = feature.ShapeCopy &amp;nbsp;&amp;nbsp;&amp;nbsp; feature = featureCursor.NextFeature Loop&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 19:40:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/featurelayer-to-geometry/m-p/343175#M9028</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2012-03-01T19:40:57Z</dc:date>
    </item>
  </channel>
</rss>

