CreatePreviewImage rhinoscript command not working in Rhino 7


I’m trying to create a preview image using Rhinoscript using this line:

It is working in Rhino 5 and 6 but it is not in Rhino 7 (tested on 7.2.21012.11001, 12/01/2021). I get a black image.

Hi @Jordi_Llonch,

I am able to repeat this.

Thanks for reporting.

– Dale

Hi @dale ,

I’m testing this on Rhino 7.3.21039.11201 and I see it is not fixed. Is it not fixed yet? I see in your tracking systems that the fix is merged.


Hey @Jordi_Llonch,

The release target for the fix is 7.4.


If you want to try the current Rhino 7.4 Release Candidate, then you can download it from here:

– Dale

Thanks Dale!

Hi Dale,
I had the same issue as Jordi (the image was completely black with V7.2).
I installed 7.4 from your link, and now, the jpg created seems to be a copy of active viewport, not the render created.
Here is the file created:
And here is a screen shot (I would expect the same image as the one in Legacy Rhino Render window, not the one from Perspective viewport.

It may be a bug unless there is a new parameter in the function CreatePreviewImage.


Yep, that’s what RhinoScript’s CreatePreviewImage method does.

If you want to script saving the render window results, then just script the SaveRenderWindowAs command.

– Dale

Hi @dale
Thank you for your reply
In V6, the Rhino.CreatePreviewImage had different behavior, it saved the RenderWindow and not the ViewPort.
I changed my script and it is OK now.

Hi @dale,
I updated the rhino version to 7.6.21127.19001 and then tried the rhinoscriptsyntax.CreatePreviewImage in rhinopython. However, the whole saved picture was still black. It seems that there is still a bug.

Hi @ruishuyan,

Try this:

– Dale