Hi there,
I am just starting to use the script editor in Version 8 (8.3.24009.15002, 2024-01-09) on a Mac computer.
My script is written in python and I want to get an rhp that I can share with others, That works well until I start to insert an icon or image in my script. When I share the rhp and the image, I can’t figure out what path I have to call, so that it works.
My code down here for the image call works if I start the code from the script editor but not from the exported rhp in Rhino or on other machine.
self.script_dir = os.path.dirname(os.path.realpath(__file__))
self.image_filename = "pixolid-256-256.png"
self.image_folder = "shared"
self.image_path = os.path.join(self.script_dir, self.image_folder, self.image_filename)
self.logo = drawing.Bitmap(self.image_path)
The error output in Rhino looks like this:
I couldn’t find any solution with google etc.
Thank you
1 post - 1 participant
