I am writing an add-in for ArcMap 10. I am trying to do Dim clickedPoint as IPoint in VB.NET, but I get "Type 'IPoint' is not defined" error. Do I have to import a class or how do I make this work?
Specifically you want to put
Imports ESRI.ArcGIS.Geometry at the top of your code files.
Alternatively you could fully qualify the IPoint type every time you use it (
ESRI.ArcGIS.Geometry.IPoint) but that gets old quick.
Tip: In Visual Studio, use the context-sensitive chip that appears when you hover over a type name with a missing namespace declaration, and click the first option to automatically add an Imports statement for the discovered namespace. This will only work as long as you have a reference to the type's assembly in your project and there is no ambiguity as to its namespace.