Select to view content in your preferred language

Clicking Add-In Button Crashes ArcMap

1191
3
11-13-2011 08:16 AM
PhyllisDavis
Deactivated User
I am trying to migrate some code I put together from 9.3 to 10.  The code displays attribute information into a customize window.  I tried to convert all of my code in Visual Studio 2008 Express and developed an add-in Button.. Once added to ArcMap though, it crashes when
clicked!

Anyone else had this problem?  Any thoughts for solutions?

I attached the Visual Studio code if it helps.
0 Kudos
3 Replies
KenBuja
MVP Esteemed Contributor
Try these changes in your TransLineEdit.vb form.

Public Class TransLineEdit
    Inherits ESRI.ArcGIS.Desktop.AddIns.Button
    Dim pForm As New frmEdit


  Protected Overrides Sub OnClick()
     Try
        pForm.Show()
     Catch ex As Exception
        System.Windows.Forms.MessageBox.Show(ex.ToString, "OnClick")
     End Try
  End Sub

End Class
0 Kudos
PhyllisDavis
Deactivated User
Thanks, Ken...


That does get my window to pop-open...but I am getting an error when I select a feature though.  Originally in 9.3 the user would select a feature, then click on this button and it would fill in the attributes on the user form.

I have attached the error I'm getting when I have a feature selected.
0 Kudos
PhyllisDavis
Deactivated User
bump...just seeing if anyone can help 🙂
0 Kudos