hm_windowtofile

Capture a rectangular area of the screen and save it to a file.

Syntax

hm_windowtofile x y width height filename

Type

HyperMesh Tcl GUI Command

Description

This command saves to a file the rectangular window area specified by you.

This command is only available and supported on Windows.

Inputs

x
The upper left window corner x-coordinate. This is relative to the root window.
y
The upper left window corner y-coordinate. This is relative to the root window.
width
The width of the window in pixels.
height
The height of the window in pixels.
filename
The full path and filename of the image to save.

Example

To get the modeling window coordinates and copy the modeling window to a file:

foreach {x y w h} [hm_getgraphicsarea] {}
hm_windowtofile $x $y $w $h c:/graphicsarea.bmp

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}

Version History

9.0