Promotic
WikipediaLinkedInYoutubeTwitterFacebook

AddPoints - method of object tvPoints

Description:
Add one data point or array of data points.
Syntax:
AddPoints(vTimes As Variant, vValues As Variant, vAttrs As Variant, nStyle As Long)
Calling:
oPoints.AddPoints vTimes, vValues, 0, 0
Parameters:
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 period of points in the buffer and the time period (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.
Note:
This is relevant only for trends that are not connected to data source (to a variable in the PmTrend object).
See also:
Example:
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);
  oTView.Draw();
}
PROMOTIC 8.3.26 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