Creates a bitmap preview image of the current model.
rhinoscriptsyntax.CreatePreviewImage (filename, view=None, size=None, flags=0, wireframe=False)
rhinoscript.document.CreatePreviewImage (filename, view=None, size=None, flags=0, wireframe=False)
filename |
Required. String. The name of the bitmap file to create. The extension of the filename controls the format of the bitmap file created.
|
||||||||||||||
view |
Optional. String. The title of the view. If omitted, the current active view is used. |
||||||||||||||
size |
Optional. Tuple or list. A tuple or list of two integers that specify the width and height of the bitmap in pixels. |
||||||||||||||
flags |
Optional. Integer. The bitmap creation flags. This parameter can be a combination of the following:
|
||||||||||||||
wireframe |
Optional. Boolean. If specified and True, then a wireframe preview image, instead of a rendered image, will be created. Note, if this option is specified and True, then the ghosted shading flag is ignored. The default value is False. |
Boolean |
True or False indicating success or failure. |
import rhinoscriptsyntax as rs
result = rs.CreatePreviewImage("test.jpg")
if result:
print "test.jpg created successfully."
else:
print "Unable to create preview image."