Help on "Command Help" of a Python Command

rhinopython
help

#1

Hello,
I’m creating simple geometry commands in Rhino Python and package them as *.rhi files. So far it was easy. Now, what I’m trying to achieve is that when a user installs the plugin and runs the command, Rhino would automatically display the online help document in the Command Help Panel. As far as I study this, it seems that the “CommandContextHelpUrl” property should be overriden but I haven’t find any python example on how and where to do that. I would appreciate a simple example for beginners like me.
Thank you.


(Steve Baer) #2

Are you using the script compiler or generating python ‘commands’? Do you have a small script sample that you can post?


#3

Thank you for the reply,
I’m not using the compiler, just doing the same thing explained here:

I have a rhi (zip) and inside, there is a TestCommand01_cmd.py file including following:

import rhinoscriptsyntax as rs
__commandname__ = "TestCommand01"
def RunCommand( is_interactive ):
    a = rs.GetPoint("Place point")
    rs.AddPoint(a)

Then in another file named _plugin.py
id="{43fade0e-3b51-4e02-b49c-5f8c994108b6}"
version="1.0.0.1"
title=“TestPlugin01”

It is working as expected.

I also prepared a rui file for the commands. And I saw that I can add a complete help document (for example a PDF) in Rhino’s Help / Plugin menu, by defining another python command such as this one;

import webbrowser
webbrowser.open_new("http://www.my help file address") 

This seem to solve my problem of providing help inside Rhino distributed along with the plugin. However, it would be nice to learn how to use Rhino’s Command Help Panel functionality.


(Steve Baer) #4

Sorry, but this feature is currently not supported in python commands. I added this feature request to our wish list at
https://mcneel.myjetbrains.com/youtrack/issue/RH-37332


#5

Ok. then I can quit trying. Thank you for the reply.
I’ll go on with the webbrowser