<?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: vb.net arcobjects determine new create feature geometry in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366173#M9625</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Frank,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the update. Yes I am looking for a way&amp;nbsp; to run code each time a new feature is created in an edit-session. Will follow the instruction you give me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Sep 2014 08:34:07 GMT</pubDate>
    <dc:creator>LiYao</dc:creator>
    <dc:date>2014-09-15T08:34:07Z</dc:date>
    <item>
      <title>vb.net arcobjects determine new create feature geometry</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366167#M9619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to check whether I can determine the geometry type of the new created feature, is it a point, polyline or polygon?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using vb.net and arcmap 10.2.1, thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 02:44:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366167#M9619</guid>
      <dc:creator>LiYao</dc:creator>
      <dc:date>2014-09-15T02:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: vb.net arcobjects determine new create feature geometry</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366168#M9620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;you could check the GeometryType of the Shape-property of IFeature:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IFeature feature = CreateFeatureOfUnknownType();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //do some null-checks here&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; switch(feature.Shape.GeometryType)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryPolygon:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //blah&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryPolyline:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //blahblah&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //etc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 07:01:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366168#M9620</guid>
      <dc:creator>FrankHellwich1</dc:creator>
      <dc:date>2014-09-15T07:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: vb.net arcobjects determine new create feature geometry</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366169#M9621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Frank for the quick reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I convert the code you provided to vb.net and insert into my vb.net project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I get an error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'CreateFeatureOfUnknownType' is not declared. Is there any library need to import?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 07:09:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366169#M9621</guid>
      <dc:creator>LiYao</dc:creator>
      <dc:date>2014-09-15T07:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: vb.net arcobjects determine new create feature geometry</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366170#M9622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry - "CreateFeatureOfUnknownType" is no existing function, it's a placeholder in this example for the function you are using to create your feature. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 07:12:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366170#M9622</guid>
      <dc:creator>FrankHellwich1</dc:creator>
      <dc:date>2014-09-15T07:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: vb.net arcobjects determine new create feature geometry</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366171#M9623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Frank,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am creating feature in arcmap, not arcobjects.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 07:25:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366171#M9623</guid>
      <dc:creator>LiYao</dc:creator>
      <dc:date>2014-09-15T07:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: vb.net arcobjects determine new create feature geometry</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366172#M9624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;so you're looking for a way to run code each time a new feature is created in an edit-session ?&amp;nbsp; This can be done by using Editor-events (see "ArcGIS Desktop editing for developers" in the online help): the editor object that handles editing tasks in ArcMap owns an event "OnCreateFeature" where you can react on new features inserted by the user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps you and meets your needs. Otherwise please give some more informations about the workflow you want to support.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Frank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 08:18:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366172#M9624</guid>
      <dc:creator>FrankHellwich1</dc:creator>
      <dc:date>2014-09-15T08:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: vb.net arcobjects determine new create feature geometry</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366173#M9625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Frank,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the update. Yes I am looking for a way&amp;nbsp; to run code each time a new feature is created in an edit-session. Will follow the instruction you give me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 08:34:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366173#M9625</guid>
      <dc:creator>LiYao</dc:creator>
      <dc:date>2014-09-15T08:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: vb.net arcobjects determine new create feature geometry</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366174#M9626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Frank,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry to trouble you. I have followed the sample code from : &lt;A href="http://resources.esri.com/help/9.3/arcgisengine/arcobjects/esriEditor/IEditEvents_OnCreateFeature.htm"&gt;http://resources.esri.com/help/9.3/arcgisengine/arcobjects/esriEditor/IEditEvents_OnCreateFeature.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can determine when the new feature is created, but I don't know how to get the geometry type, any hints? So sorry I know little about arcobjects. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 09:28:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366174#M9626</guid>
      <dc:creator>LiYao</dc:creator>
      <dc:date>2014-09-15T09:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: vb.net arcobjects determine new create feature geometry</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366175#M9627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Li,&lt;/P&gt;&lt;P&gt;no problem. In the event-handler OnCreateFeature you receive the parameter "obj" of type IObject. IFeature inherites from IObject - in this case the parameter obj &lt;SPAN style="text-decoration: underline;"&gt;&lt;EM&gt;&lt;STRONG&gt;is&lt;/STRONG&gt; &lt;/EM&gt;&lt;/SPAN&gt;an IFeature so that you can cast obj to IFeature and use the code above to check the GeometryType. &lt;/P&gt;&lt;P&gt;I'm no vb-crack but I guess it should look like this (at least similar):&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Private Sub OnCreateFeature(ByVal obj As ESRI.ArcGIS.Geodatabase.IObject)
&amp;nbsp;&amp;nbsp; Dim feature as IFeature
&amp;nbsp;&amp;nbsp; feature = DirectCast(obj, IFeature)
&amp;nbsp;&amp;nbsp; if feature.Shape.GeometryType = ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryPolygon then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'do something with a polygonfeature
&amp;nbsp;&amp;nbsp; else etc.
&amp;nbsp;&amp;nbsp; ...
 End Sub&lt;/PRE&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Frank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:01:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366175#M9627</guid>
      <dc:creator>FrankHellwich1</dc:creator>
      <dc:date>2021-12-11T17:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: vb.net arcobjects determine new create feature geometry</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366176#M9628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Frank, it works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 00:45:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366176#M9628</guid>
      <dc:creator>LiYao</dc:creator>
      <dc:date>2014-09-16T00:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: vb.net arcobjects determine new create feature geometry</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366177#M9629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Frank,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea on how to get the layer name of the new created feature? Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 02:41:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366177#M9629</guid>
      <dc:creator>LiYao</dc:creator>
      <dc:date>2014-09-16T02:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: vb.net arcobjects determine new create feature geometry</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366178#M9630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Li,&lt;/P&gt;&lt;P&gt;I didn't checked it by myself but I think the following should work: the editor implements the interface IEditLayers which contains the property CurrentLayer. This is the layer the user selected to add the new feature:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim uid As UID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uid = New UIDClass()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uid.Value = "esriEditor.Editor"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim editor As IEditor&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; editor = CType(m_application.FindExtensionByCLSID(uid), IEditor)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim editLayers as IEditLayers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; editLayers = CType(editor, IEditLayers)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim layer as ILayer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layer = editLayers.CurrentLayer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; et voila ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Frank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 07:16:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366178#M9630</guid>
      <dc:creator>FrankHellwich1</dc:creator>
      <dc:date>2014-09-16T07:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: vb.net arcobjects determine new create feature geometry</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366179#M9631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Frank,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Great...thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 07:37:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-determine-new-create-feature/m-p/366179#M9631</guid>
      <dc:creator>LiYao</dc:creator>
      <dc:date>2014-09-16T07:37:58Z</dc:date>
    </item>
  </channel>
</rss>

