NCL Home > Documentation > HLUs > API


The Fortran name of this function is NhlFRemoveData.

This function is used to dissociate a DataItem object from a data resource in a DataComm object.

C synopsis

#include <ncarg/hlu/DataComm.h>

NhlErrorTypes NhlRemoveData(
		int		dcommid,
		NhlString	res_name,
		int		ditemid

Fortran synopsis

     subroutine NhlFRemoveData(dcommid, res_name, ditemid, ierr)
     integer dcommid, ditemid, ierr
     character*(*) res_name


dcommid (input)
Identifies the DataComm object with the data resource.
res_name (input)
Identifies the data resource to remove the ditemid from in the DataComm object.
ditemid (input)
Identifies the id of the DataItem or DataSpec object to dissociate from the res_name resource in the dcommid DataComm object.
ierr (output, Fortran only)
Error code.


Type name:		NhlTErrorTypes
typedef enum _NhlErrType{
	NhlFATAL	= -4,	/* "FATAL"	*/
	NhlWARNING	= -3,	/* "WARNING"	*/
	NhlINFO		= -2,	/* "INFO"	*/
	NhlNOERROR	= -1	/* "NOERROR"	*/
} NhlErrorTypes;


This function is used to dissociate the given ditemid DataItem object from the given res_name data resource in the given dcommid DataComm object. The ditemid must have already been added to the res_name resource of the dcommid object with an AddData function first.

To allow a higher degree of configurability, it is also possible that a DataSpec object had been added to the res_name resource. If that is the case, then the DataSpec id must be used to dissociate the DataItem as well.

Return values

The NhlRemoveData C function returns a value of type NhlErrorTypes, and the NhlFRemoveData Fortran subroutine returns the error in ierr. The following table indicates what the return error values mean:
Value	|			Meaning
NOERROR	|	The DataItem was removed from the res_name
	|	data resource without any problems.
INFO	|	Recoverable error.
WARNING	|	Recoverable error.
FATAL	|	Unable to remove the given dcommid from
	|	the object. Usually indicates that the
	|	user provided an invalid dcommid or
	|	res_name. If there is problem internally,
	|	then it is possible that the dcommid
	|	object was destroyed to maintain the
	|	integrity of the HLU library.

See also