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.
************** 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.