Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Browser Command stopped working...why?

3 REPLIES 3
Reply
Message 1 of 4
CADdaddy.com
416 Views, 3 Replies

Browser Command stopped working...why?

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

3 REPLIES 3
Message 2 of 4
SomeBuddy
in reply to: CADdaddy.com

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

 

Message 3 of 4
Kent1Cooper
in reply to: CADdaddy.com

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 Cooper, AIA
Message 4 of 4
CADdaddy.com
in reply to: Kent1Cooper

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost