vb.net arcobjects call attribute dialog once a new feature is created

2333
1
Jump to solution
10-09-2014 03:00 AM
WuYang
by
New Contributor II

Hi all,

In my vb.net arcmap add-in application, I want to know how to popup the attribute dialog by arcobjects. I cannot do this by using "Display the attributes dialog before storing new features" because I have more function based on the attributes input of the new created feature.

I tried to find a solution from internet, but failed to get it.

I am using arcmap and arcobjects 10.2.2. Thanks in advance.

0 Kudos
1 Solution

Accepted Solutions
DuncanHornby
MVP Notable Contributor

When you say "popup the attribute dialog" are you referring to the dockable Attributes panel (available only in edit mode) where you can edit attributes of a feature? Or are you talking about the Attribute Table?

The following VBA calls the button that opens the Attribute Panel as if you had clicked on it.

Public Sub openPanel()

    Dim pUID As IUID

    Set pUID = New UID

    pUID.Value = "{44276914-98C1-11D1-8464-0000F875B9C6}"

    Dim pCommandBars As ICommandBars

    Set pCommandBars = Application.Document.CommandBars

    Dim pCommandItem As ICommandItem

    Set pCommandItem = pCommandBars.Find(pUID, True)

    pCommandItem.Execute

End Sub

View solution in original post

1 Reply
DuncanHornby
MVP Notable Contributor

When you say "popup the attribute dialog" are you referring to the dockable Attributes panel (available only in edit mode) where you can edit attributes of a feature? Or are you talking about the Attribute Table?

The following VBA calls the button that opens the Attribute Panel as if you had clicked on it.

Public Sub openPanel()

    Dim pUID As IUID

    Set pUID = New UID

    pUID.Value = "{44276914-98C1-11D1-8464-0000F875B9C6}"

    Dim pCommandBars As ICommandBars

    Set pCommandBars = Application.Document.CommandBars

    Dim pCommandItem As ICommandItem

    Set pCommandItem = pCommandBars.Find(pUID, True)

    pCommandItem.Execute

End Sub