Command Help for c# plugins

I have a c# plugin with some commands in it and I tried to use the F1->Help. But somehow it does not work. I used the following example c# code:

public class Command_sphe_add_field_point : SphereneCommand
{
    public override string EnglishName => "sphe_add_field_point";
    
    protected override string CommandContextHelpUrl => "https://www.spherene.ch/documentation/sphereneRHINO/index.html";
    protected override Rhino.Commands.Result RunCommand(Rhino.RhinoDoc doc, Rhino.Commands.RunMode mode)
    {
        excecute_named_command("add_field_point", doc);
        return Rhino.Commands.Result.Success;
    }
}

What version of Rhino are you using? There was an issue with Help not being displayed, but that was fixed in 8 Service Release 9.

actually Rhino 8 SR15 2025-1-19 (Rhino 8, 8.15.25019.13001, Git hash:master @ 74164bdf5469c2f269746857c54b8c44b74c7b24)

It works - at least partially. When you have the Help panel open, and run the command the Help is updated. If you have the Help panel open and search for the command in the panel search bar, it gives a 404 error. This is now logged as RH-86006.

Note: at no point did I need to use the F1 key, F1 opens the help pages of Rhino itself in my browser - there will never be anything on there of third party plug-ins.

Thanks a lot for clarifications. I thought the f1 button will open the default “external” browser with the corresponding url. I did not realize that there is a help panel. For the internal commands the f1 button is opening an external browser.

Best Ralph

The issue with searching for the URL has been fixed, and this will be coming in a next service release.
As for pressing F1, it would be nice if that also worked for third-party plugin commands that have a help URL in their definition, so here is another ticket RH-86033

Hi @Social_Spherene,

To support F1 help for your command, override Command.OnHelp.

protected override void OnHelp()
{
  try
  {
    string uri = "https://spherene.ch/";
    System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(uri) { UseShellExecute = true });
  }
  catch
  {
    // Do nothing
  }
}

Does this help (no pun intended)?

– Dale

2 Likes

RH-86006 is fixed in Rhino 8 Service Release 17