CreatePreviewImage

Creates a bitmap preview image of the current model.

Syntax

Rhino.CreatePreviewImage (strFile [, strView [, arrSize [, intFlags [, blnWireframe]]]])

Parameters

strFile

Required. String. The name of the bitmap file to create.  The extension of the filename controls the format of the bitmap file created.

Type

Description

bmp

Windows Bitmap

tga

Truevision Targa

jpg, jpeg

JPEG Compliant

pcx

Zsoft Paintbrush

png

Portable Network Graphics

tif, tiff

Tagged Image File Format

strView

Optional.  String.  The title of the view.  If omitted, the current active view is used.

arrSize

Optional.  Array.  An array of two integers that specify the width and height of the bitmap in pixels.

intFlags

Optional.  Integer.  The bitmap creation flags. This parameter can be a combination of the following:

Value

Description

1

Honor object highlighting.  The default is to ignore highlighting (False).

2

Draw construction plane.  The default is not to draw the construction plane (False).

4

Use ghosted shading.  The default is to use the view's default display mode (False).

blnWireframe

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.

Returns

Boolean

True or False indicating success or failure.

Example

Dim blnResult

blnResult = Rhino.CreatePreviewImage("test.jpg")

If blnResult = True Then

Rhino.Print "Test.jpg created successfully."

Else

Rhino.Print "Unable to create preview image."

End If

Also See

ExtractPreviewImage