Home > Working with SGWorld > Window (IWindow6) > GetSnapShot

GetSnapShot

Returns a snapshot of the window.

 

JavaScript

 

GetSnapShot(toFile,Width,Height,Format,TerrainQuality)

 

C#

 

string GetSnapShot(

      bool toFile = false,

      int   Width = 0,

      int   Height = 0,

      string Format = "",

      int   TerrainQuality = 0)

 

C++

 

HRESULT GetSnapShot(

      VARIANT_BOOL toFile,

      long  Width,

      long  Height,

      BSTR  Format,

      long  TerrainQuality,

      BSTR * pPath )

 

Parameters

toFile

A Boolean that indicates whether the snapshot should be saved to a file (true) or opens a dialog window with the snapshot image.

Width

The width of the snapshot. Optional, default: undefined. If the width is not specified, the snapshot is created with the current 3D Window width.

Height

  The height of the snapshot. Optional, default: undefined. If the height is not specified, the snapshot is created with the current 3D Window height.

Format

A string defining the format and compression of the image file. Use ”BMP” for a windows bitmap file, or  “JPeg75" for a 75% JPEG image.

TerrainQuality

Defines how to get the required terrain database resolution for every snapshot. The following are the possible values for this property:

·         0 (default) – Use the terrain database information that is currently in memory.

·         1 – Use the best resolution available in the MPT. Download and wait for additional information, if required.

Return Value

pPath

The path to the file where the snapshot was saved in the local temporary directory.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.