Cicode Programming Reference > Cicode Function Categories > Trend Functions Introduction > TrnDelHistory

TrnDelHistory

Removes a trend history file that has been added to the trend system by the TrnAddHistory() function. This function does not delete the file completely, it only disconnects it from the historical trend system.

This function can only be used if the Trend Server is on the current machine. When the Trend Server is not in the calling process, this function will become blocking and cannot be called from a foreground task. In this case, the return value will be undefined and a Cicode hardware alarm will be raised.

Syntax

TrnDelHistory(FileName [, ClusterName] )

FileName:

The trend history file to disconnect from the historical trend system.

ClusterName:

Specifies the name of the cluster in which the Trend Server resides. This is optional if you have one cluster or are resolving the trend server via the current cluster context. The argument is enclosed in quotation marks "".

Return Value

0 (zero) if successful, otherwise an error is returned.

Related Functions

TrnAddHistory, MsgRPC

Example

TrnDelHistory("C:\CITECT\DATA\TR1_91.MAY");
! Disconnects the file from the trend system.

See Also

Trend Functions