Select to view content in your preferred language

VB.net Walkthrough for Arc10 help

622
3
07-19-2010 10:58 AM
RyanFurlong
Regular Contributor
Hey everyone I am doing the walk through located;

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Walkthrough_Building_cu...

my issue is when I enter my code for the for the first section as so;
Public Class Button1
    Inherits ESRI.ArcGIS.Desktop.AddIns.Button

    Public Sub New()

    End Sub

    Protected Overrides Sub OnClick()
        ZoomToActiveLayerInTOC(TryCast(ArcMap.Application.Document, IMxDocument))
    End Sub


    Protected Overrides Sub OnUpdate()
        Enabled = My.ArcMap.Application IsNot Nothing
    End Sub
End Class

I get an error saying I did not declare
ZoomToActiveLayerInTOC
,
ArcMap.
and
IMxDocument

how do I fix this?  The walk through does not say anything about making declarations.  BTW I am using Visual Studio 2008 express.  Thank you for the help.
0 Kudos
3 Replies
RyanFurlong
Regular Contributor
Never mind I figured it out.
0 Kudos
JeffArnett
Deactivated User
Greetings,

I am experiencing the exact same issue.  Could you kindly share your solution?

Regards,

Jeff
0 Kudos
MichaelRobb
Honored Contributor
When you Inherit Addins.Button.

MY namespace can be used.

My.ArcMap.Application
0 Kudos