Picture frame

Hello ,

I need to insert a photo (Pictureframe) from python script, but I need to insert attributes for the size.

Anything like, get image and first point 0.0.0 and length 20.0.0?
Any idea?

You might want to check the online help for rs.AddPictureFrame() here:


All the parameters you need to supply are listed…

Thank you,

For some reason dont work for me.

import rhinoscriptsyntax as rs

rs.AddPictureFrame(plane,“Halo.jpg”, width=3000, height=1500, self_illumination=True, embed=False, use_alpha=False, make_mesh=False)

Any error??

Just off the top of my head, I think maybe you need to put in the full path to the picture file… don’t forget to consider the backslash escape character problem in Python, for constructed file paths either you need double backslashes or use raw strings…

You could also try using rs.OpenfileName() to have a dialog to get your file, that should return a good path you can feed directly to AddPictureFrame().

Also: plane=rs.WorldXYPlane() - don’t forget the ()…

Any better?


1 Like

This is my code

path=""“C:\Users\Ricardo Eira\Desktop\Test.jpeg”""
rs.AddPictureFrame(plane,path, width=3000, height=1500, self_illumination=True, embed=False, use_alpha=False, make_mesh=False)


Message: ‘module’ object has no attribute ‘AddPictureFrame’

I think this means that there is no function in this module ??

Hi @MatrixRatrix,

If you are still using Rhino 5, then you will need to script the PictureFrame command, as rhinoscriptsyntax in V5 does not have a AddPictureFrame method.

Rhino 6, however, does have the method that @Helvetosaur mentioned.

– Dale

Yeah, I kinda suspected that might be the case…

Sorry late,

Yes, I am using Rhino5.