I would like to import 3rd party dll to rhino python and distribute plugin to others, how could I guarantee that the dll imported correctly on every user I send to?
My attempt is write a bat file that auto-copying the dll to rhino installation path, and in the script just import dll from installation path with clr, I think this is the most convenient way. But I didn’t find related method to auto get installation path in rhinocommon api. May be I miss something?
Instead of copying the DLL to the Rhino installation path, you can embed it within your plugin. This ensures that the DLL is always available to your plugin, regardless of the user’s system configuration.
You could use setup a remote server from which the DLL is automatically downloaded if not present when your plugin loads.
There are many solutions that I think are more elegant than hardcoding the DLL location inside of the RhinoFolder.