Closed sbaer closed 12 years ago
Can you please point me to the code that does that on the Rhino.Python editor form? Does it have a hard-coded location?
The python help file is always in the same directory as the python plug-in. Here's the code in the plug-in to get at the help file
System.Reflection.Assembly a = System.Reflection.Assembly.GetExecutingAssembly();
string dir = System.IO.Path.GetDirectoryName(a.Location);
string filename = System.IO.Path.Combine(dir, "RhinoIronPython.chm");
You can probably do something similar in the ghpython component by getting the Assembly that the PythonScript object is defined in.
var py = Rhino.Runtime.PythonScript.Create();
var a = py.GetType().Assembly;
string dir = System.IO.Path.GetDirectoryName(a.Location);
string filename = System.IO.Path.Combine(dir, "RhinoIronPython.chm");
Done
add link in editor for opening the python help file