CursorValue - method of the tvTrend object
Value that corresponds to the cross of the cursor vertical line with the trend graph.
Double CursorValue([Long nStyle])
|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
The method returns the value null
(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)
var oTView = pMe.Items("../TrendView");
var oTrend = oTView.Trends(0);
var nCursorValue = oTrend.CursorValue(2);