RemovePoints - method of the tvPoints object
Description:
Removes data points from buffer according to the sFilter, vParam parameters.
Syntax:
Empty RemovePoints(String sFilter, [Variant vParam])
Parameters:
sFilter | (String) Range of values that will be removed. For example text in the form range:all;time:lt;.
"range" - Range of values that will be removed. For example text in the form range:all;.
"all" - All values that are in the buffer. If the time parameter is set, then all values from the buffer are removed but only till the time value set by the time, vParam parameters.
"visible" - The values that are in the moment of calling in the visible part of the buffer. If the time parameter is set, then all values from the visible part are removed but only till the time value set by the time, vParam parameters.
"one" - Only one value. It has sense only if the time parameter is set, it removes the value according to the parameters time, vParam.
"time" - Specifies which values are removed from the buffer. In this case it is necessary to enter the vParam parameter.
"near" - The point closest to the time set in the vParam parameter is removed from the buffer. In this case the range parameter isn't taken into consideration.
"gt" - All values according to the range parameter are removed from the buffer and they are greater than the time entered in the vParam parameter.
"ge" - All values according to the range parameter are removed from the buffer and they are greater or equal the time entered in the vParam parameter.
"lt" - All values according to the range parameter are removed from the buffer and they are less than the time entered in the vParam parameter.
"le" - All values according to the range parameter are removed from the buffer and they are less or equal the time entered in the vParam parameter. |
vParam | [optional] (Variant) Time - specifies the range of values that will be removed. It is entered only if the time parameter is set. |
---|
Note:
This method is also functional in
Web panels.
It has sense only for trends that are
not connected to data source (to the variable in the
PmaTrendGroup object).
Example1:
Example removes all values from the buffer that are less or equal to the time: 18.11.2017 22:00:00.
JavaScriptVBScriptSelect and copy to clipboard
var oTView = pMe.Items("../TrendView");
var oPoints = oTView.Trends("t1").Points;
var sFilter = "range:all;time:le;";
var vParam = Pm.CreateDate(2017, 11, 18, 22, 0, 0, 0);
oPoints.RemovePoints(sFilter, vParam);
Dim oTView, oPoints
Set oTView = pMe.Items("../TrendView")
Set oPoints = oTView.Trends("t1").Points
Dim sFilter, vParam
sFilter = "range:all;time:le;"
vParam = Pm.CreateDate(2017, 11, 18, 22, 0, 0, 0)
oPoints.RemovePoints sFilter, vParam
Example2:
Example removes one value from the buffer that is closest to the entered time: 18.11.2017 22:00:00.
JavaScriptVBScriptSelect and copy to clipboard
var sFilter = "time:near;";
var vParam = Pm.CreateDate(2017, 11, 18, 22, 0, 0, 0);
oPoints.RemovePoints(sFilter, vParam);
Dim sFilter, vParam
sFilter = "time:near;"
vParam = Pm.CreateDate(2017, 11, 18, 22, 0, 0, 0)
oPoints.RemovePoints sFilter, vParam