ESRI.ArcGIS.Carto is missing?

4625
4
Jump to solution
01-31-2013 06:38 AM
BrianBaldwin1
New Contributor III
Good morning all, I am just diving into ArcObjects and have been trying to work through some of the samples to get my feet wet, but am having issues with this one in particular. 

I am trying to work through the 'Building Custom UI Elements' http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//0001000001ms000000

When I load the ZoomToActiveLayerinTOC snippet, i am getting an error that the ESRI.ArcGIS.Carto.IActiveView is not defined.

While it's faint, there are only four options in the ArcGIS class (ArcMapUI, Desktop, esriSystem, Framework)

What am I doing wrong?

I included a screen shot of the code sample.[ATTACH=CONFIG]21248[/ATTACH]
0 Kudos
1 Solution

Accepted Solutions
JasonPike
Occasional Contributor
Just to add a little more specificity, the errors that I am getting are as follows:

Error 1 Type 'ESRI.ArcGIS.Carto.IActiveView' is not defined.
Error 2 Type 'ESRI.ArcGIS.Carto.ILayer' is not defined.
Error 3 Type 'ESRI.ArcGIS.Carto.ILayer' is not defined.


Make sure you've added a reference to ESRI.ArcGIS.Carto to your project.

View solution in original post

0 Kudos
4 Replies
BrianBaldwin1
New Contributor III
Just to add a little more specificity, the errors that I am getting are as follows:

Error 1 Type 'ESRI.ArcGIS.Carto.IActiveView' is not defined.
Error 2 Type 'ESRI.ArcGIS.Carto.ILayer' is not defined.
Error 3 Type 'ESRI.ArcGIS.Carto.ILayer' is not defined.
0 Kudos
JasonPike
Occasional Contributor
Just to add a little more specificity, the errors that I am getting are as follows:

Error 1 Type 'ESRI.ArcGIS.Carto.IActiveView' is not defined.
Error 2 Type 'ESRI.ArcGIS.Carto.ILayer' is not defined.
Error 3 Type 'ESRI.ArcGIS.Carto.ILayer' is not defined.


Make sure you've added a reference to ESRI.ArcGIS.Carto to your project.
0 Kudos
BrianBaldwin1
New Contributor III
Sc,

Thanks for the response.  I didn't know what the heck this even meant, but it did help solve the problem after a little research. 

I was just confused why the Walkthrough wouldn't provide this as part of the scenario...or at least a tip if users encountered this problem. 

Just to be clear:  I ended up just going upto Project, Add Reference, and then located and added the two Reference.dll's that were required, this solved my problem.  Lot more to learn!
0 Kudos
WilliamBuerger
Occasional Contributor
You're right that the walkthrough doesn't specifically tell you to add the references.  But it looks like the text in the code snippets mention the references that are required for that snippet.  So make sure you check that.

Also, the ESRI components should all be listed under the .NET tab when adding a reference.  You shouldn't have to browse to the dlls themselves.  Just look for the references the snippet says are required.

[ATTACH=CONFIG]21257[/ATTACH]
0 Kudos