TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Peter2 on March 25, 2019, 08:25:32 AM

Title: Setfunhelp: call a HTML in standard browser?
Post by: Peter2 on March 25, 2019, 08:25:32 AM
I have these code-lines, taken from online-line:

Code - Auto/Visual Lisp: [Select]
  1. (defun c:test()
  2.     (getstring "Press F1 for help on the test command:")
  3. )
  4. (setfunhelp "c:test" "d:/temp.html")

Works (nearly) as expected, but it calls the "AutoCAD Browser" to display the HTML instead of my standard browser. I accept that this is a feature and not a bug, but nevertheless - due to compatibility and functionality reasons - I would prefer that the "standard browser" is invoked.

Any simple ways to get it (to avoid startapp and sub-routines and ...) ???
Title: Re: Setfunhelp: call a HTML in standard browser?
Post by: mkweaver on April 15, 2019, 03:04:30 PM
Try this:
Code - Auto/Visual Lisp: [Select]
  1.     (setq
  2.       objShell (vla-getinterfaceobject(vlax-get-acad-object) "wscript.shell")
  3.       Run (vlax-invoke objShell 'RUN FileName 5)
  4.       )
  5.     (vlax-release-object objShell)

With FileName set to your html file
Title: Re: Setfunhelp: call a HTML in standard browser?
Post by: Peter2 on April 23, 2019, 05:57:49 AM
Thanks mkweaver

the code works fine to call a defined html-file just now. But this is not what "setfunhelp" does - to define a file in background which is called via F1..