Cicode Programming Reference > Cicode Function Categories > Trend Functions Introduction > 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.


TrnDelHistory(FileName [, ClusterName] )


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


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


! Disconnects the file from the trend system.

See Also

Trend Functions