PDA

View Full Version : Map 2008 API



bweir
2007-08-30, 08:14 PM
I'm working with AutoCAD Map 3D 2007 and 2008. I've created a little command in VB.Net using the Map API to import a shape file into AutoCAD. The program works great in 2007 BUT in 2008 I get the following error...



************** Exception Text **************
Autodesk.Gis.Map.MapImportExportException: Exception of type 'Autodesk.Gis.Map.MapImportExportException' was thrown.
at Autodesk.Gis.Map.Interop.ThrowMapImportExportExceptionForErrorStatus(Int32 errorCode)
at Autodesk.Gis.Map.ImportExport.Importer.Init(String formatName, String fileName)
at mwstBadgerTools.mwstCommandClass.ImportBadger_Command()
at AcMgCommandClass.InvokeWorker(AcMgCommandClass* , MethodInfo mi, Object commandObject, Boolean bLispFunction)
at AcMgCommandClass.InvokeWorkerWithExceptionFilter(AcMgCommandClass* , MethodInfo mi, Object commandObject, Boolean bLispFunction)
at AcMgPerDocumentCommandClass.Invoke(AcMgPerDocumentCommandClass* , gcroot<System::Reflection::MethodInfo ^>* mi, Boolean bLispFunction)
at AcMgCommandClass.CommandThunk.Invoke(CommandThunk* )

It appears to be a problem in the ManagedMapApi.dll file but maybe I'm doing something wrong in my code. I know some other features in Map 2008 got a little screwy could the API also have been monkeyed with?

Any guidance as to how to use the Map API would be greatly appreciated.

Jmurphy
2007-09-04, 12:43 PM
I'm far from being a .Net guru but as a map user there are some changes in the mapimport between 2007 and 2008. So I say they changed a method or class somewhere along the line.