Hi there,
i have compiled some scripts into a PlugIn which runs on Windows and Mac. One of my PlugIn commands should open a helpdoc in pdf format which is placed in the Shared directory using the new ScriptEditor before building the PlugIn. The command to open the helpdoc gets the PlugIn by guid using this code:
plugin_guid = System.Guid("6b8644a1-b6eb-4bef-8cb7-1317e25e95a0")
plugin_file = Rhino.PlugIns.PlugIn.PathFromId(plugin_guid)
if not plugin_file:
msg = "PlugIn with guid '{}' not found, please install first."
print msg.format(plugin_guid)
return
# get the full path
plugin_path = System.IO.Path.GetDirectoryName(plugin_file)
shared_path = System.IO.Path.Combine(plugin_path, "Shared\PM_Help.pdf")
if not System.IO.File.Exists(shared_path):
msg = "Error - file not found in 'Shared' PlugIn directory: {}"
print msg.format(shared_path)
return
else:
return shared_path
This works fine under Windows, however on Mac i get this (my) error message:
Error - file not found in ‘Shared’ PlugIn directory:
/Users/clement/Library/Application Support/McNeel/Rhinoceros/packages/8.0/MyPlugInName/0.1.9+9150/Shared\PM_Help.pdf
Does someone know how to fix this ? The path shown above exists as well as the pdf file.
thanks,
c.