GetLogInfo

Deprecated. Do not use in new code.

(Engine-Level Function)

Description: Interrogates a historical data file, or a set of historical data files, and returns overall time, date, and record count information either for the entire file(set), or for a specified time range.
Returns: Nothing (data returned in parameters)
Usage: Script Only.
Function Groups: File I/O,  Log
Related to:  GetLogInfo | HistorianDeleteRecords | HistorianGetData | HistorianGetInfo | HistorianReadRecords | HistorianWriteRecords | Get | GetHistory | Save | SaveHistory | TGet
Format: GetLogInfo(File, Earliest, Latest, NRecords [, PathPrefix, StartTime, EndTime]);
Parameters:  
File
Required. The historical data file (or index file for a file set) for which information is required.
Earliest
Required. Any variable in which will be returned the earliest time stamp from the file(set).
Latest
Required. Any variable in which will be returned the latest time stamp from the file(set).
NRecords
Required. Any variable in which will be returned the total number of records in the file(set).
PathPrefix
An optional text expression parameter that enables and controls the retrieval of data from across a set of files.
StartTime
An optional timestamp parameter that defines the start time of the range to be examined.
EndTime
An optional timestamp parameter which defines the end time of the range to be examined.
Comments:

For any optional parameter that is to be set, all optional parameters preceding the desired one must be present, although they may be Invalid.
All timestamps are specified in seconds since January 1, 1970.
If the number of records found is zero, then Earliest and Latest are both set Invalid.
If PathPrefix is specified, then this changes the interpretation of the File parameter. In this case, the referenced file is not the source of the data, but a file containing references to other files which are the data sources. This file should be in standard VTScada logfile format and should contain a file reference as the first text value of each record (other values are ignored). The records should be in the correct time order with respect to the data files. The value of the PathPrefix is a string, which when prefixed to one of the file references, will yield a full pathname to the target file. If no prefix is required, but expansion of the dataset is required, then PathPrefix should be an empty string.

  • If a filename entry does NOT begin with a "\" or "<drive letter>:\", then the PathPrefix will be prepended to the filename.
  • If a filename entry DOES begin with "<drive letter>:\", then the PathPrefix will NOT be prepended to the filename.
  • If a filename entry does begin with a "\", then the "<drive letter>:" from the PathPrefix will be prepended to the filename. If there is no "<drive letter>:" in the PathPrefix then the "<drive letter>:" from the path of the File parameter will be used instead.

PathPrefix would normally be Invalid or the application path.