I'm receiving a COM error that I need some help resolving.
IN REFERENCES, I'VE INCLUDED THE FOLLOWING:
AutoCAD 2010 Type Library
AutoCAD/ObjectDBX Common 18.0 Type Library
Here's the code:
Imports Autodesk.AutoCAD.Interop
Imports Autodesk.AutoCAD.Interop.Common
Dim AcadApp As AcadApplication
Dim dbxDoc As AxDbDocument
' Check for AutoCAD
AcadApp = GetObject(, "AutoCAD.Application")
If Err.Number <> 0 Then
Err.Clear()
AcadApp = CreateObject("AutoCAD.Application")
End If
dbxDoc = AcadApp.GetInterfaceObject("ObjectDBX.AxDbDocument.18") **ERROR**
Dim dwgName As String = drawingPath.Text
dbxDoc.Open(dwgName) **ERROR**
-->IN DEBUG, THE GetInterfaceObject LINE HAS THE FOLLOWING ERROR:
dbxDoc.Application {"Error HRESULT E_FAIL has been returned from a call to a COM component"}
THE CODE CONTINUES TO THE dbxDoc.Open(dwgName) LINE, WHEN I RECEIVE THE FOLLOWING:
System.Runtime.InteropServices.COMException was unhandled
ErrorCode=-2147467259
Message=Error HRESULT E_FAIL has been returned from a call to a COM component.
Source=Autodesk.AutoCAD.Interop.Common
DOES ANYONE KNOW HOW TO RESOLVE THIS?
THANKS
Jerri