ObjectDBX error: "Problem in loading application"

Discussion in 'AutoCAD' started by James Allen, Feb 16, 2005.

  1. James Allen

    James Allen Guest

    Hi all,

    I've done a little odbx with vlisp, but this is my first attempt at it with
    vba (w2kp, a2k5).

    I could not find "ObjectDBX 1.0 Type Library" in my reference list, nor
    axdb16.tlb on my computer.
    (But "My Computer\HKEY_CLASSES_ROOT\ObjectDBX.AxDbDocument.16" is present in
    my registry.)
    So I referenced "AutoCAD/ObjectDBX Common 16.0 Type Library" (axdb16enu.tlb)
    despite previous posts that the former is what is needed. But then I get
    the subject line error at the set statement. Before I referenced the type
    library I got an 'undefined user type' error at the dim statement.
    Hopefully I'm missing something simple here, but I've searched the ngs quite
    a bit for an answer. Any suggestions appreciated.

    Code:
    Public Sub GetDbxDoc()
    Dim Doc As AxDbDocument
    Set Doc = AcadApplication.GetInterfaceObject("ObjectDBX.AcDbDocument.16")
    Doc.Open "M:\2005 Cad Support\MWE Base.dwg"
    End Sub
    
     
    James Allen, Feb 16, 2005
    #1
  2. James Allen

    Jeff Mishler Guest

    James,
    In 2004+ the reference is not ODBX 1.0 Type Library. I only have 2002, so
    I'm not sure what it should be, but another user I was helping recently
    found the right one rather quickly. Do you have any other ODBX types listed
    in the reference selection dialog? NOT the Autocad/ one, it must be listed
    by itself.
     
    Jeff Mishler, Feb 16, 2005
    #2
  3. James Allen

    James Allen Guest

    Hi Jeff, I'm not seeing any others on a couple passes through the list.

    James
     
    James Allen, Feb 16, 2005
    #3
  4. It looks OK to me.

    Maybe try
    Set Doc = AcadApplication.GetInterfaceObject("ObjectDBX.AcDbDocument.16.1")
     
    Jorge Jimenez, Feb 16, 2005
    #4
  5. James Allen

    James Allen Guest

    Hi Jorge, I tried adding the ".1"; made no difference.

    James


     
    James Allen, Feb 16, 2005
    #5
  6. Looks like there might be a problem with your instalation.
    See if the axdb16.dll is under the AutoCAD directory
    Register it manually using regsvr32

    --
    Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica


     
    Jorge Jimenez, Feb 16, 2005
    #6
  7. Hey wait a minute, is that AcDbDocument.16 I see
    or is it just a spelling mistake on your post
    Check your code 'cause is should read AxDbDocument.16

    --
    Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica

     
    Jorge Jimenez, Feb 16, 2005
    #7
  8. James Allen

    James Allen Guest

    Oh my! You got it. I was afraid, but kind of hoping, I would end up
    feeling this silly. :\ <lol>

    Thank you Jorge,

    James
     
    James Allen, Feb 16, 2005
    #8
  9. James Allen

    James Allen Guest

    Still leaves me wondering about the missing piece though, since the
    consensus seems to be NOT to use Acad/Obj...Common... and I can't find the
    other (which is supposed to be registered already by acad?). axdb16.dll is
    present, so I tried start->run
    "regsvr32.exe c:\acad2005\axdb16.dll" and got this error message:
    ----------------------------------------------------------------------------
    -------------
    c:\acad2005\axdb16.dll was loaded, but the DllRegisterServer entry point was
    not found.

    DllRegisterServer may not be exported, or a corrupt version of
    c:\acad2005\axdb16.dll may be in memory. Consider
    using PView to detect and remove it.
     
    James Allen, Feb 16, 2005
    #9
  10. AutoCAD/ObjectDBX Common 16.0 Type Library
    That's the one you should use in your references in VB

    What's finally loaded by your code is the axdb16.dll
    (that does not contain the type lib.)

    Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica
     
    Jorge Jimenez, Feb 16, 2005
    #10
  11. James Allen

    James Allen Guest

    Thanks again Jorge. I went back to google and it appears that I was (not
    only misspelling things, but also) trying to run on old information.

    Thank you,

    James
     
    James Allen, Feb 17, 2005
    #11
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.