For some reason the Browser command has stopped working for me. I've tried the following code in versions 2006, 2010, and 2011 and no joy. There is no crash...the browser just fails to appear. In each version I confirmed that the "file" variable was non-nil. Has anyone run into this? I'm using Vista Home Premium x64. My default browser in IE8 (32 bit).
(if (setq file (findfile "AutoAttribute.html"))
(command "browser" file)
(dcl_messagebox "Cannot find Help file AutoAttribute.html" "Warning")
)
Thanks,
James LeVieux
Hi James,
I don't have time to check why it stopped working, but I suggest you get rid of the (command ...) stuff and try the next one:
(if (setq file (findfile "AutoAttribute.html")) (startapp (substr (setq str (vl-registry-read "HKEY_CLASSES_ROOT\\htmlfile\\shell\\open\\command" ) ) 2 (1- (vl-string-search "\" " str)) ) file ) (dcl_messagebox "Cannot find Help file AutoAttribute.html" "Warning") )
HTH
Might your Browser command have been undefined or redefined somehow? Do you get any kind of error message?
Try using "_.browser" [with the underscore and period prefixes].
Kent,
I tried your suggestion and again...no joy. There is no error message and the code returns nil which I believe is normal for commands in lisp. I'm inclined to believe that this is due to the 64 bit version of AutoCAD or Windows...I don't know which is the cause. I tested on a 32 bit machine and it runs fine.
I'm planning to use SomeBuddy's workaround but it appears to be a bug to me.
James