hwISession CaptureActiveWindow

Capture the active window to an image file of a specific dimension.

Syntax

hwISession_handle CaptureActiveWindow type, filename, dimension_type, width, height

Application

HyperWorks Tcl Query

Inputs

type
The image file type. Options include: BMP and JPEG.
filename
The filename that you are writing the captured image to.
dimension_type
Specifies the width and height units of the final image, which can be in percent or pixels.
width
The number of width units of the final captured image.
height
The number of height units of the final captured image.

Example

To determine if the current plot is drawn with a uniform aspect ratio (in other words, equal width and height):
hwi GetSessionHandle mySessionName
mySessionName CaptureActiveWindow JPEG c:/temp/fun.jpg percent 150 150

mySessionName CaptureActiveWindow JPEG c:/temp/fun.jpg pixels 1280 960

Error

Success (0) or an error code.