Routines (alphabetical) > Routines: H > HDF-EOS Routines > EOS_GD_ATTACH

# EOS_GD_ATTACH

This function attaches to the grid using the gridname parameter as the identifier.

## Examples

In this example, we attach to the previously created grid, “ExampleGrid”, within the HDF file, GridFile.hdf, referred to by the handle, fid:

gridID = EOS_GD_ATTACH(fid, "ExampleGrid")

The grid can then be referenced by subsequent routines using the handle, gridID.

## Syntax

Result = EOS_GD_ATTACH(fid, gridname)

## Return Value

Returns the grid handle (gridID) if successful and FAIL(–1) otherwise.

## Arguments

### fid

Grid file id (long) returned by EOS_GD_OPEN.

### gridname

Name of grid (string) to be attached.

## Keywords

None

## Version History

5.2 | Introduced

## See Also

EOS_GD_DETACH