'setfunhelp' does not work

The reference in
https://developer.bricsys.com/bricscad/help/en_US/V23/DevRef/index.html?page=source/setfunhelp.htm
says
(setfunhelp "C:SelectPipe" "PipeHelp.chm" "PipeHelp")..
Return: if successful, c:cmd string is returned, NIL otherwise"


I have this result:
Befehl: (setfunhelp "c:test" "www.cadtools.de")
nil
Befehl: (setfunhelp "C:SelectPipe" "PipeHelp.chm" "PipeHelp")
nil
And every F1 that I press leads to Bricsy main-page.
In Acad2023 it works fine..

Any ideas what is going wrong?

Comments

  • From my testing, the condition for (setfunhelp) to succeed is to issue the command as command, not as function.
    So, if using lisp is involved, the command call should be:
    (command "test")
    and not
    (c:test)

    With (c:test), both Autocad and Bricscad go to the website help page on pressing F1.

    Regarding the returned value, indeed, even if the help file was registered, in Bricscad the return was always NIL in my testing.
    Maybe, there is something else needed, that I couldn't find yet.
  • Thanks, Virgil
    I tested again - but neither "command" nor "test" nor "c:test" does it right ..
  • Hello.
    This worked fine for me:
    
    (defun c:test (/ a)
      (setq a (getstring "\n\nPress F1 for help:"))
      (princ)
    )
    
    (defun fn_help ( / path )
      (setq path "c:\helpfile.html")
      (if (findfile path)
        (setfunhelp "c:test" path)
        "Help file not found."
      )
    )
    
    (setq b (fn_help))
    (if (not b) (setq b "NIL"))
    (princ (strcat "\n\n" b))
    (princ "\n")
    
    (command "test")
    
    (setfunhelp) returned nil, so "NIL" was prompted at the command line.
    Then, with the TEST command active, pressing F1 opened helpfile.html.

    The same behavior occurred in my testing when typing TEST at the command line.
  • I used exactly your code - no success. Maybe there is something with my settings (Win 10, German, Firefox as standard), so maybe others users or Bricsys can share their experience.
  • Dear All,

    the defect with the wrong result status (the improper NIL of (setfunhelp) function) has been fixed.

    @Peter2
    is your help file anywhere in SupportPaths ?
    You might check with (findfile "myHelpFile.chm") ?

    > Befehl: (setfunhelp "c:test" "www.cadtools.de")
    > Befehl: (setfunhelp "C:SelectPipe" "PipeHelp.chm" "PipeHelp")

    these are fictious smaples :-) There in no "PipeHelp.chm" file existing :-)

    Can you provide your real help file here, and the (setfunhelp ...) statement that you use with your help file ?

    many greetings !
  • Hi Torsten
    I don't link to a help-file, I try to define an internal website. But here is an example which does not work in Brics, but in Acad:
    Befehl: (defun c:test (/ a)
    (_>   (setq a (getstring "\n\nPress F1 for help:"))
    (_>   (princ)
    (_> )
    C:TEST
    Befehl: (setfunhelp "c:test" "https://www.klassikradio.de/")
    nil
    Befehl: TEST
    
    Press F1 for help:
    -->> here it opens the  site https://help.bricsys.com/search?size=n_20_n&current=n_1_n
    
  • I found another problem - "Setfunhelp" replaces the "repeat last command" - function

    We know this function:
    enter some command, e.g. line - draw and finish the line - press Enter - "Line command" is repeated

    In my customization, I have this package:
    - a partial CUI, called "mytools.cui"
    - a MNL, named "mytools.mnl"
    - inside the MNL, I have
    - (autoload "my_tools.lsp" '("tool1"))
    - (setfunhelp "c:tool1" "http://intranet/intra/index.php/anleitungen/cad-befehle")

    Now I have this behaviour:
    enter some command, e.g. line - draw and finish the line - press Enter - my browser opens the Bricsy main-page.
  • Dear Peter,

    > enter some command, e.g. line - draw and finish the line - press Enter - my browser opens the Bricsy main-page.

    this I can not reproduce in V24.1.08, I tried locally :
    
    : (setfunhelp "c:tool1" "http://intranet/intra/index.php/anleitungen/cad-befehle")
    nil
    : _LINE
    Start of line: 
    Set end point or [Angle/Length/Undo]: 
    Set end point or [Angle/Length/Follow/Undo]: 
    : 
    : LINE
    Start of line or [Follow] <Last point>: 
    Cancel
    
    that "nil" after (setfunhelp) had been fixed, for upcoming V24.2 version ...
    but / did start the LINE command again, after (setfunhelp ...)
    so not clear, what is going on at your machine ...
    maybe try to disable
    > (autoload "my_tools.lsp" '("tool1"))

    and potentially more code, until repetition with space/return works again, then enable the disabled code, step-by-step to identify what breaks later repetition ?

    sorry for not having better news :-(
    many greetings !