AddPoints - method of object tvPoints

Add one data point or array of data points.
AddPoints(vTimes As Variant, vValues As Variant, vAttrs As Variant, nStyle As Long)
oPoints.AddPoints vTimes, vValues, 0, 0
vTimes(Variant) Single time value or time array in ascending order.

The time is expected according to setting the TrendsView.TimeSetType property, i.e. "local time", "standard time" or "daylight-saving time".

vValues(Variant) Single numeric (real) value or array of these values.
vAttrs(Variant) Not used, set the value 0.
nStyle(Long) The style how to add a data point (an array of points) into the tvPoints buffer:
0 - Add a point (an array of points) at the end of the buffer
1 - Delete the content of the buffer and add a point (an array of points)
4 - If the time-range of points in the buffer and the time-range (or only one time) of newly added points overlaps, then keep all points in the buffer and add from new ones only those who don't overlap.
5 - If the time of some added points corresponds with the time of existing points, then the existing points will be kept and these new ones won't be added, others will be added on the corresponding time locations in the buffer of points.
This is relevant only for trends that are not connected to data source (to a variable in the PmTrend object).
See also:
JavaScriptVBScriptSelect and copy to clipboard

var oTView = pMe.Acx;
var oPoints = oTView.Trends("t1").Points;
var vTimes, vValues;
oTView.TimeSetType = 1;  //Time will be entered as: 1 = "local time", 2 = "standard time" even in the daylight-saving season
//vTimes = ...
//vValues = ...
if (oPoints)
  oPoints.AddPoints(vTimes, vValues, 0, 0);
PROMOTIC 8.3.30 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice