Routines (alphabetical) > Routines: H > HDF Routines > HDF_GR_SETEXTERNALFILE

# HDF_GR_SETEXTERNALFILE

This function causes the specified HDF GR raster image be written to the specified external file, at the specified offset. Data can be moved only once for any given raster image, and it is the user's responsibility to make sure the external data file is kept with the “original” file. If the raster image already exists, its data will be moved to the external file. Space occupied by the data in the primary file will not be released. If the raster image does not exist, its data will be written to the external file during the subsequent calls to HDF_GR_WRITEDATA.

## Syntax

Result = HDF_GR_SETEXTERNALFILE(ri_id, filename, offset)

## Return Value

Returns SUCCEED (0) if successful or FAIL (-1) otherwise.

## Arguments

### ri_id

Raster image identifier returned by HDF_GR_CREATE or HDF_GR_SELECT.

### filename

Name of the external file.

### offset

Offset in bytes from the beginning of the external file to where the data will be written.

## Keywords

None

## Version History

5.2 | Introduced