Author Topic: Error: Automation Error. Problem in loading application  (Read 5775 times)

0 Members and 1 Guest are viewing this topic.

AngelKostadinov

  • Newt
  • Posts: 30
Error: Automation Error. Problem in loading application
« on: March 05, 2014, 03:50:57 AM »
Hello,
In our company we are using both .net and lisp extension functions for AutoCad 2010 - 2014 to help construction department. We have more than 50 PC with installed AutoCad and only few of them throw error when specific lisp command is executed -> Error: Automation Error. Problem in loading application.
You can find the lisp file with problematic function (RenameBlock) below.
I've searched internet for answer and found this -> http://www.cadforums.net/showthread.php/4309-vla-GetInterFaceObject-Automation-error, but didn't help a lot.
From CMD I run following command: regsvr32.exe axdb.dll but nothing happens because Register Service can't find proper entry point to register the DLL.
I will be very grateful to those of you who can explain why that error happens and how to solve the problem :)
Best regards,
Angel

NICK_VNV

  • Newt
  • Posts: 63
Re: Error: Automation Error. Problem in loading application
« Reply #1 on: March 05, 2014, 04:23:01 AM »
This topic helped me with the same problem  http://www.theswamp.org/index.php?topic=40871.msg461180#msg461180
Sorry for my English...

AngelKostadinov

  • Newt
  • Posts: 30
Re: Error: Automation Error. Problem in loading application
« Reply #2 on: March 05, 2014, 06:59:51 AM »
On my development  machine in registry there is following record HKEY_CLASSES_ROOT\ObjectDBX.AxDbDocument.18\CLSID, but on the machine that's throwing the error, there isn't.
Please check the attached picture from my dev machine.
I can create this registry folder hierarchy through Registry Editor, but how to create the last record with name: (Default) and Data: {EBF0F8FD-632A-4AB8-8D71-E77217898747}.

I copied just this simple method for registering dll into registry. When I am calling ASDDSA inside AutoCad on my dev machine the number 33 is returned.
The lisp function has to make the same thing that I am trying to accomplish manually with Registry Editor, isn't it?
Code: [Select]
(defun C:ASDDSA()
(startapp "regsvr32.exe" (strcat "/s \" C:\axdb.dll\""))
)

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: Error: Automation Error. Problem in loading application
« Reply #3 on: March 05, 2014, 03:54:50 PM »
Firstly, the latest version of that program may be found here.

Regarding the error you are receiving, you can attempt to register the DLL required for ObjectDBX using the following program:

Code: [Select]
;; Register ObjectDBX (Verbose version)  -  Lee Mac
;; Attempts to register the AxDb.dll as required by ObjectDBX.
;; Returns T if successful or if the dll is already registered, else returns nil.

(defun c:regodbx ( / cmd dll key vrs )
    (print
        (or
            (and
                (vl-registry-read
                    (setq key
                        (strcat "HKEY_CLASSES_ROOT\\ObjectDBX.AxDbDocument"
                            (if (= 15 (setq vrs (atoi (getvar 'acadver))))
                                "\\CLSID"
                                (strcat "." (itoa vrs) "\\CLSID")
                            )
                        )
                    )
                )
                (princ (strcat "\nObjectDBX already registered at\n" key))
            )
            (and
                (or
                    (and
                        (setq dll (findfile (strcat "AxDb" (itoa vrs) ".dll")))
                        (princ (strcat "\nFound file: " dll))
                    )
                    (and
                        (setq dll (findfile "AxDb.dll"))
                        (princ (strcat "\nFound file: " dll))
                    )
                    (not
                        (princ (strcat "\nNeither AxDb" (itoa vrs) ".dll nor AxDb.dll could be found."))
                    )
                )
                (or
                    (startapp "regsvr32.exe" (setq cmd (strcat "\"" dll "\" /s")))
                    (startapp (strcat (getenv "WinDir") "\\System32\\regsvr32.exe") cmd)
                    (startapp (strcat (getenv "WinDir")   "\\System\\regsvr32.exe") cmd)
                    (not (princ (strcat "\nUnable to register dll: " dll)))
                )
                (vl-registry-read key)
            )
        )
    )
    (textpage) (princ)
)
(vl-load-com) (princ)

I hope this helps!  :-)

AngelKostadinov

  • Newt
  • Posts: 30
Re: Error: Automation Error. Problem in loading application
« Reply #4 on: March 07, 2014, 02:18:09 AM »
Excellent! Thank you very much!

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: Error: Automation Error. Problem in loading application
« Reply #5 on: March 08, 2014, 09:51:05 AM »
Excellent! Thank you very much!

You're welcome!
Can I assume that the program solved the issue?