Is it possible to work with MapDocuments from a console app.
Here's some example code:
IMapDocument pMapDocument = new MapDocument();
This is the error I'm getting:
Retrieving the COM class factory for component with CLSID {2FE5E68E-3DA5-4BDA-BAF1-103C55115A1C} failed due to the following error: 80040111 ClassFactory cannot supply requested class (Exception from HRESULT: 0x80040111 (CLASS_E_CLASSNOTAVAILABLE)).
The reason I'm asking is because I've been able to create MapDocument objects from an add-In to ArcMap, but I'd prefer to use a console app that does not depend on an ArcMap session.
This was the code used in the Add-in:
IMapDocument mapDoc = ArcMap.Document as IMapDocument;
IMxDocument mxDoc = ArcMap.Application.Document as IMxDocument;
So my question is, what's the console app equivalent?
Here's some example code:
IMapDocument pMapDocument = new MapDocument();
This is the error I'm getting:
Retrieving the COM class factory for component with CLSID {2FE5E68E-3DA5-4BDA-BAF1-103C55115A1C} failed due to the following error: 80040111 ClassFactory cannot supply requested class (Exception from HRESULT: 0x80040111 (CLASS_E_CLASSNOTAVAILABLE)).
The reason I'm asking is because I've been able to create MapDocument objects from an add-In to ArcMap, but I'd prefer to use a console app that does not depend on an ArcMap session.
This was the code used in the Add-in:
IMapDocument mapDoc = ArcMap.Document as IMapDocument;
IMxDocument mxDoc = ArcMap.Application.Document as IMxDocument;
So my question is, what's the console app equivalent?