Promotic

CursorValue - method of the tvTrend object

Description:
Value that corresponds to the cross of the cursor vertical line with the trend graph.
Syntax:
Double CursorValue([Long nStyle])
Parameters:
nStyle[optional](Long) Further specification of the cross.
0 (default) - Data point is searched whose time is less or equal the time of the cursor vertical line
1 - Data point is searched whose time is greater or equal the time of the cursor vertical line
2 - Data point is searched that is closest to the time of the cursor vertical line
Return values:
The method returns the value null for JavaScript or Empty pro VBScript (it can be tested by the Pm.IsValid method) in following cases:
- if there is no point in the data points buffer (the property has nothing to return)
- if the cursor is not switched on (i.e. is set PmgTrendViewer.CursorType = 0)
- if the table mode is (i.e. is set PmgTrendViewer.ViewMode = "table")
Note:
This method is also functional in Web panels.
 
The method is used only if the graphic mode is set.
See also:
Example:
JavaScriptVBScriptSelect and copy to clipboard

var oTView = pMe.Items("../TrendView");
var oTrend = oTView.Trends(0);
if (oTrend)
{
var nCursorValue = oTrend.CursorValue(2);
}
PROMOTIC 9.0.21 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.