[Top] [Prev] [Next] [Bottom]

ANcreate/afcreate

int32 ANcreate(int32 an_id, uint16 tag, uint16 ref, int32 annot_type)
an_id

IN:

Multifile data annotation interface identifier returned by ANstart

tag

IN:

Tag of the element the created data annotation will be applied to

ref

IN:

Reference number of the object the created data annotation will be applied to

annot_type

IN:

Type of data annotation

Purpose

Creates an data annotation for the object identified by the specified tag and reference number.

Return value

Returns a data annotation identifier if successful and FAIL (or -1) otherwise.

Description

The data annotation identifier returned can either point to a data label or a data description.

Valid values for annot_type are: AN_DATA_LABEL for data labels and AN_DATA_DESC for data descriptions.

Example

This example illustrates the use of ANcreate to create an data label for a numeric data group.

#include "hdf.h"

int32 an_id, ann_id, file_id, stat;
uint16 tag = DFTAG_NDG;
uint16 ref = 2;
ann_type type = AN_DATA_LABEL;

file_id = Hopen("myfile", DFACC_WRITE, 0);
an_id = ANstart(file_id);
ann_id = ANcreate(an_id, tag, ref, type);
       ...
stat = ANendaccess(ann_id);
stat = ANend(an_id);
Hclose(file_id);
      
FORTRAN

integer function afcreate(an_id, tag, ref, annot_type)

integer an_id, tag, ref, annot_type



[Top] [Prev] [Next] [Bottom]

hdfhelp@ncsa.uiuc.edu
HDF User's Reference Manual, Draft 06/01/97, NCSA HDF Development Group.