ExtractPreviewImage

Extracts the bitmap preview image from the specified model (.3dm).

Syntax

rhinoscriptsyntax.ExtractPreviewImage (filename, modelname=None )

rhinoscript.document.ExtractPreviewImage (filename, modelname=None )

Parameters

filename

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

modelname

Optional.  String.  The model (.3dm) from which to extract the preview image.  If omitted, the currently loaded model is used.

Returns

Boolean

True or False indicating success or failure.

Example

import rhinoscriptsyntax as rs

result = rs.ExtractPreviewImage("test.jpg")

if result:

    print "Test.jpg created successfully."

else:

    print "Unable to extract preview image."

Also See

CreatePreviewImage