Routines (alphabetical) > Routines: H > HDF5 Routines > H5A_CREATE

# H5A_CREATE

The H5A_CREATE function creates a dataset as an attribute of another group or dataset.

Note: Attributes are intended to be small objects with a maximum size of 16 kilobytes, data sizes greater than this limit will cause the attribute creation to fail. A large dataset intended as meta data for another dataset can be stored as an additional dataset. An attribute can then be attached to the original dataset as an object reference pointer to the desired supplemental dataset.

## Example

See the example under H5_CREATE.

## Syntax

Result = H5A_CREATE(Loc_id, Name, Datatype_id, Dataspace_id)

## Return Value

The Result gives the attribute identifier number. This identifier should be released with the H5A_CLOSE procedure.

## Arguments

### Loc_id

An integer giving the identifier of the group, dataset, or named datatype to which the attribute will be attached

### Name

A string giving the name of the attribute to create.

### Datatype_id

An integer giving the datatype identifier of the new attribute.

### Dataspace_id

An integer giving the dataspace identifier of the new attribute.

## Keywords

None

## Version History

6.2 | Introduced

## See Also

H5A_CLOSE, H5S_CREATE_SIMPLE, H5T_IDL_CREATE