ObjectDBX - Registering AxDb16.dll

Discussion in 'AutoCAD' started by jimmilam, Jun 30, 2004.

  1. jimmilam

    jimmilam Guest

    I am trying to register AxDb16.dll using RegSvr32.exe. I keep getting the message that the module cannot be found (I have it on my computer). I've tried with and without the .dll extension and with and without the path with the same results. Any ideas?
     
    jimmilam, Jun 30, 2004
    #1
  2. jimmilam

    Ed Jobe Guest

    Starting with 2004, its no longer necessary to register it.
     
    Ed Jobe, Jun 30, 2004
    #2
  3. jimmilam

    jimmilam Guest

    Thanks, Ed.
    Here's where I am now. I wrote a simple routine to open a drawing in ObjectDBX and show a message box with the drawing name. The routine runs in Excel VBA.

    Dim DbxDoc As AxDbDocument, FName
    Set DbxDoc = GetInterfaceObject("ObjectDBX.AxDbDocument")
    FName = "C:\HYDRO\CAD_Dwgs\Bull Shoals\SWPA\E1001.dwg"
    Set DbxDoc = GetObject(FName)
    MsgBox "File Name is " + DbxDoc.Name

    The routine gets as far as the "Set" command and I get "Run Time error '-2147221005 (800401f3)': Problem in loading application". I have references set to:
    Visual Basic for Applications
    Microsoft Excel 9.0 Object Library
    OLE Automation
    Microsoft Forms 2.0 Object Library
    Microsoft Office 9.0 Object Library
    AutoCAD 2005 Type Library
    AutoCAD/ObjectDBX Common 16.0 Type Library

    With this information, can you see where my problem may lie?
    Thanks,
    Jim
     
    jimmilam, Jul 1, 2004
    #3
  4. jimmilam

    SpeedCAD Guest

    Hi...

    Private autocadApp As AcadApplication

    In the event Load of UserForm:

    Set autocadApp = GetObject(, "AutoCAD.Application.16.1")
    Set DbxDoc = autocadApp.GetInterfaceObject("ObjectDBX.AxDbDocument.16")
     
    SpeedCAD, Jul 1, 2004
    #4
  5. jimmilam

    jimmilam Guest

    Thanks for the suggestion. Here's my sticking point now. The routine starts, but when I get to the statement

    Set DbxDoc = GetObject(FName)

    it stops and I get a type mismatch error (see code in a previous reply).
     
    jimmilam, Jul 1, 2004
    #5
  6. You created an instance of AxDbDocument earlier in your code with the
    call to GetInterfaceObject yet here you are trying to create another
    instance without using GetInterfaceObject. That's not going to work.

    I think you'll find that replacing this line with the following code
    will yield the result you're looking for:

    DbxDoc.Open FName
     
    Frank Oquendo, Jul 1, 2004
    #6
  7. You're using GetObject. You need to use the AcadApplication's
    GetInterfaceObject method to create the AxDbDocument.
     
    Tony Tanzillo, Jul 1, 2004
    #7
  8. jimmilam

    jimmilam Guest

    Frank,
    Thanks for the suggestion. I substituted the statement

    DbxDoc.Open FName
    for the statement
    Set DbxDoc = GetObject(FName)

    When the routine got to the new statement I got a Run Time Error - Method "Open" of object 'IAxDbDocument' failed.
    What am I doing wrong here?
    Thanks,
    Jim
     
    jimmilam, Jul 1, 2004
    #8
  9. Is the path correct? Does the file exist? Is it open in an AutoCAD
    session?
     
    Frank Oquendo, Jul 1, 2004
    #9
  10. jimmilam

    jimmilam Guest

    Tony,
    Thank you for your help. I tried using the GetInterfaceObject method in place of the GetObject method and got another Run Time error - Problem in loading Application.
    Any ideas.
    Thanks,
    Jim
     
    jimmilam, Jul 1, 2004
    #10
  11. Perhaps you should post your code again along with an explanation of
    your goals.
     
    Frank Oquendo, Jul 1, 2004
    #11
  12. jimmilam

    Ed Jobe Guest

    ObjectDbx can't open a read-only dwg or a dwt. Any of those situations fit?

    --
    ----
    Ed
    ----
    Perhaps you should post your code again along with an explanation of
    your goals.
     
    Ed Jobe, Jul 1, 2004
    #12
  13. "Open" of object 'IAxDbDocument' failed.
    I believe the .dwg extension in the filename is not optional.

    OTOH, you're saying in one post that you can't create the object,
    but if you got this far, then you must have.

    Now, if you don't mind, this isn't a TV game show, where everyone
    has to guess about exactly what the code you don't want to post is
    doing (unless you're offering a prize?).

    Post your code.


    AutoCAD based Security Planning Solutions:
    http://www.caddzone.com/securityplanning
     
    Tony Tanzillo, Jul 2, 2004
    #13
  14. jimmilam

    jimmilam Guest

    Thanks to everybody for all the help and suggestions. I've been out of the office for over a week and apologize for the delay in posting replies.
    Ed, the file I was attempting to open was indeed read-only. Many of the files I need to access are also read-only. I need to address this problem before pursing Object DBX any further.
    Once again, thanks to everybody for all the help.
    Jim
     
    jimmilam, Jul 12, 2004
    #14
  15. Assuming you're doing a 'read-only' operation, then you
    can copy a read-only file to another filename, and then
    open that instead.



    read-only. I need to address this problem before pursing Object DBX any further.
     
    Tony Tanzillo, Jul 13, 2004
    #15
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.