Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

Using Framework reference, but can’t access DocumentClass

$
0
0
I’m using Visual C# 2008 Express and I’m creating an Add=in button that will display the name of the map document when clicked. The title property is available in the Document class using the interface IDocument. I’m using the ESRI.ArcGIS.Framework reference, but the following code:
Code:

protected override void OnClick()
        {           
            IDocument doc = new DocumentClass();
 
            ArcMap.Application.CurrentTool = null;
        }

gives me the following error: ‘the type or namespace name ‘DocumentClass’ could not be found’. I'm confused because this works with the MxDocumentClass and the ArcMapUI reference. Any help would be greatly appreciated.

Viewing all articles
Browse latest Browse all 1374

Trending Articles