Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 5 down vote accepted

Yes, since you are presumably using VB.NET (not VB, which is 20+ years old and no longer supported), you need to use the Imports statement to import namespaces.

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.

share|improve this answer
I tried all this, but it doesn't work. When I use the import statement it seems as though it can't find the Geometry class. I get a warning "Namespace or type specified in the Imports 'ESRI.ArcGIS.Geometry' doesn't contain any public member or cannot be found. etc etc etc" – Xoph May 1 '12 at 17:20
You need to add a reference to ESRI.ArcGIS.Geometry. In Solution Explorer -> Right Click on References -> Add Reference -> Select ESRI.ArcGIS.Geometry – Jakub May 1 '12 at 17:49
Instead of using "Add Reference", you should use "Add ArcGIS Reference", since that automatically sets the Specific Version to False. – kenbuja May 1 '12 at 18:02
Thanks that worked great. – Xoph May 1 '12 at 18:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.