Promotic

RemovePoints - method of the tvPoints object

Description:
Removes data points from the 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).
See also:
Example1:
Example removes all values from the buffer that are less or equal to the time: 18.11.2023 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(2023, 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.2023 22:00:00.
JavaScriptVBScriptSelect and copy to clipboard

var sFilter = "time:near;";
var vParam = Pm.CreateDate(2023, 11, 18, 22, 0, 0, 0);
oPoints.RemovePoints(sFilter, vParam);
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

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