PDA

View Full Version : ActiveX Server returned an error: Library not registered



sinc
2004-07-11, 05:26 AM
I'm trying to write some VLisp that accesses LDD and Civil Design objects. Why does the following code return the error:

ActiveX Server returned an error: Library not registered


(defun c:test ()
(vl-load-com)
(setq AeccProject
(vlax-get-property
(vla-getinterfaceobject
(vlax-get-acad-object)
"Aecc.Application"
)
'ActiveProject
)
) ; setq
)

Jeff_M
2004-07-11, 04:32 PM
Are you trying to run this on a machine that LDD is not installed on? Or in non-Land environment (land-enabled map)? Or, maybe, in a new unnamed, therefor no project, drawing?

Only things I can think of.....

sinc
2004-07-11, 05:30 PM
Running LDD 2004, drawing has a project, all LDD, Civil Design, and Survey commands work fine; a small lisp routine I wrote that uses the F:BEAR and F:NE functions (functions I found calls to by browsing through lsp files in the Land directory, although I still haven't found the definitions of the functions) works fine (as long as the current drawing is in a project). But I get the ActiveX error on the vlax-get-property expression (the vla-getinterfaceobject part seems to work - at least it doesn't return nil).

sinc
2004-07-12, 05:42 PM
I tried explicitly linking in the type library. Apropos and syntax highlighting work fine, but I still get the error when I try to run.

I've run across the following references of what sounds like the same problem in other software by doing a web search:

The problem in eMbedded VB 3.0 (http://www.baysidestudios.com/Developer/A011202a.cfm)

The problem in ActiveEdition CMS (http://support.activedition.com/Web/Site/KB/KBarticles/Automation_Error_LibraryNotRegistered.asp)

I had a mysterious issue some time ago where all my MSWord application shortcuts disappeared, and MSWord would no longer appear in the start menu. And, since MS changed Office so that Word, Excel, and who-knows-what are all one executable started with funky custom shortcuts, the only way I could start Word was by double-clicking on an existing word document, or using the "New Office Document" start menu item. I finally fixed this by using the Add/Remove Programs control panel, and selecting "Repair Installation" on Office. Now that I think about it, it was around then that all my AutoCAD problems started: AutoCAD crashing on point import/export, AutoCAD crashing on surface generation, AutoCAD not being able to remember recent files (I solved that one - I somehow discovered that the recent file list for Windows Explorer had been disabled by a mysteriously-created registry key, which was also somehow preventing ALL programs from being able to display recent-files lists; deleting the bogus key fixed the problem), etc.

I'm starting to think that something in the MSOffice installation/repair is responsible, and corrupts something having to do with VBA and/or ActiveX. If so, it's possible that even uninstalling and reinstalling AutoCAD won't fix the problem. I'm suspecting I might have to unregister and re-register my type library or some dll or other, but I don't know how to go about that, or even if it's really what I need to do. If the registration of the ActiveX type library is corrupted, shouldn't that keep LDD and Civil Design from working at all?

sinc
2004-07-24, 04:18 AM
I have yet to figure this out, and it's really, ahem, bugging me. I have no idea what's going on, but suspect something has corrupted my registry. I tried using a utility to re-register the type libraries, but that didn't seem to have any effect. I tried uninstalling and reinstalling everything (Land, Civil, and Survey), to no avail. (BTW, I notice the uninstall seems to be rather lame. After I reinstalled everything, huge amounts of my custom settings were still around. I suppose I should have done some poking around before reinstalling...)

I keep getting this stupid ActiveX error. Is there some error log somewhere that I can check, and get more data about what's going on? Or possibly some extended debugging output or trace? I'm still new to this environment, and don't really know my way around too well yet. (A Unix background frequently doesn't help much when dealing with Windows and ActiveX... :wink: )