vb.net arcobjects determine new create feature geometry

2893
12
Jump to solution
09-14-2014 07:44 PM
LiYao
by
New Contributor III

Dear all,

I want to check whether I can determine the geometry type of the new created feature, is it a point, polyline or polygon?

I am using vb.net and arcmap 10.2.1, thanks.

0 Kudos
12 Replies
LiYao
by
New Contributor III

Hi Frank,

Any idea on how to get the layer name of the new created feature? Thanks.

0 Kudos
FrankHellwich1
New Contributor III

Hi Li,

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:

    Dim uid As UID

    uid = New UIDClass()

    uid.Value = "esriEditor.Editor"

    Dim editor As IEditor

    editor = CType(m_application.FindExtensionByCLSID(uid), IEditor)

     Dim editLayers as IEditLayers

     editLayers = CType(editor, IEditLayers)

     Dim layer as ILayer

     layer = editLayers.CurrentLayer

    et voila ....

Frank

LiYao
by
New Contributor III

Hi Frank,

Great...thanks a lot.

0 Kudos