.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

OBjectDBX - COM Error

0 REPLIES 0
Reply
Message 1 of 1
j_degner
686 Views, 0 Replies

OBjectDBX - COM Error

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

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost