vla-GetInterFaceObject Automation error

Discussion in 'AutoCAD' started by Randy Richardson, Feb 28, 2005.

  1. Most of the machines here run the following code just fine:

    (vla-GetInterfaceObject (vlax-get-acad-object) "ObjectDBX.AxDbDocument")

    However, there is one that returns this message:

    Program error: Automation Error. Problem in loading application(0)

    The "vlax-get-acad-object" function works just fine. The
    "vla-GetInterfaceObject" function is defined. We're working with AutoCAD
    2002.

    Last week, the machine with the error had AutoCAD stop working, and after
    hours of trying to figure out the reason, that particular problem was solved
    by reloading AutoCAD.

    Where should I look to find the reason for this error?

    Thanks,

    Randy
     
    Randy Richardson, Feb 28, 2005
    #1
  2. Randy Richardson

    Jeff Mishler Guest

    ObjectDBX is probably not registered on that machine.Here's a check that I
    include in my lisps that will autoregister it if needed.
     
    Jeff Mishler, Feb 28, 2005
    #2
  3. Randy Richardson

    Jeff Mishler Guest

    Hmmmm, hit CTRL-V and it sent my reply....strange. Here's the code:

    (if (and (= (atoi (getvar "AcadVer")) 15)
    (not (vl-registry-read
    "HKEY_CLASSES_ROOT\\ObjectDBX.AxDbDocument\\CLSID"))
    )
    (startapp "regsvr32.exe" (strcat "/s \"" (findfile "axdb15.dll") "\""))
    )
     
    Jeff Mishler, Feb 28, 2005
    #3
  4. I had that same code, except for the part about checking for the acad
    version. So I was tempted to think that that was not the answer. However,
    realizing that AutoCAD had been re-installed since the registry item had
    been defined, I deleted the registry item and re-ran the program, and now it
    works fine.

    So, thanks.
     
    Randy Richardson, Mar 1, 2005
    #4
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.