... a work in progress.
And I need your help to do it.
Based on
this thread I've a bunch of LISP code written to achieve the title's namesake and it's working quite nicely, but it's all for naught if the average machine doesn't have the type library info dll installed and registered, so I need you to run a quick test. Although my reading suggests tlbinf32.dll should be on any PC that's had VB or VBA installed (it's what used to populate the object browser [F2]) I hate assuming.
Can you run the code snip that follows and tell me what it prints to the screen?
(defun c:TliTest ( / _GetTliCLSID _FindDLL _RegSvr32 _Main )
(defun _GetTliCLSID ( )
(vl-registry-read
(strcat
"HKEY_CLASSES_ROOT\\"
"TLI.TLIApplication\\"
"CLSID"
)
)
)
(defun _FindDLL ( dll / path windir )
(if
(vl-some
'(lambda (x) (setq path (findfile x)))
(list
dll
(strcat
(setq windir (getenv "WinDir"))
"\\System\\"
dll
)
(strcat windir "\\System32\\" dll)
)
)
path
)
)
(defun _RegSvr32 ( dll / cmd path match )
(vl-some
'(lambda (x) (startapp x (strcat "\"" dll "\" /s")))
(list
(setq cmd "regsvr32.exe")
(strcat
(setq path (getenv "WinDir"))
"\\System\\"
cmd
)
(strcat path "\\System32\\" cmd)
)
)
)
(defun _Main ( / clsid dllpath )
(if (setq clsid (_GetTliCLSID))
(princ (strcat "Found CLSID: " clsid))
(if (setq dllpath (_FindDll "tlbinf32.dll"))
(progn
(princ (strcat "Found DLL: " dllpath))
(_RegSvr32 dllpath)
(if (setq clsid (_GetTliCLSID))
(princ (strcat "Found CLSID: " clsid))
(princ "Doh! DLL registration failed.")
)
)
(princ "Better write a better _FindDLL MP!")
)
)
(princ)
)
(_Main)
)
Also, if you could answer these riveting questions --
1. What version of Windows?
2. What version of AutoCAD?
3. Have you ever run the VBAIDE?
4. What path on your machine hosts tlbinf32.dll?
5. Do you have Visual Studio 6 installed on an active drive?
ABUNDANT THANKS FOR YOUR HELP.
