TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: AngelKostadinov 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 (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
-
This topic helped me with the same problem http://www.theswamp.org/index.php?topic=40871.msg461180#msg461180
-
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?
(defun C:ASDDSA()
(startapp "regsvr32.exe" (strcat "/s \" C:\axdb.dll\""))
)
-
Firstly, the latest version of that program may be found here (http://bit.ly/1e2xv9p).
Regarding the error you are receiving, you can attempt to register the DLL required for ObjectDBX using the following program:
;; 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! :-)
-
Excellent! Thank you very much!
-
Excellent! Thank you very much!
You're welcome!
Can I assume that the program solved the issue?