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:
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.
The Document class is an abstract class (see the legend for the OMD). Abstract classes cannot be instantiated. The only classes you can create new instances of are listed in the help topic for IDocument (such as MxDocument).
Looking at the Framework Object Model diagram(ArcGIS 10) there is a Document class( with the IDocument interface). Doesn't that mean that there is a Document class? And that it would be within the Framework refernce? I'm afriad that I'm very far off from understanding how to cast between interfaces!
The Document class is an abstract class (see the legend for the OMD). Abstract classes cannot be instantiated. The only classes you can create new instances of are listed in the help topic for IDocument (such as MxDocument).