I wan’t to optimize my workflow in Rhino and started to dig from previously created scripts in this forum.
Then I asked my self: how to run these script on startup that it won’t ask to be loaded every single time there is a need for them?
What are your practices dealing storing scripts? Is it convenient to have a folder of all scripts or is there more efficient way to store and run them?
This topic correlates with either Rhino and grasshopper scripting.
The example above demonstrates how to import functions/classes from an external Python file into a GhPython component. However I also import and run functions from that same file by assigning them to Rhino keyboard shortcuts. Here’s a recent example:
The trick here is to be a bit unpythonic and use semicolons to add multiple lines of code into a one line string. That is, the macro on the F7 keyboard shortcut in the screenshot is:
If not, and probably advisable in general on the Rhino side, one can make actual commands. And again, things probably look a bit different with the scripting options provided in Rhino 8.