InsertTrend - method of object TrendsView

Method creates and returns a new object of the tvTrend type. The object is located into the trends container to the nIndex index and whenever it is accessible by the Trends property.
InsertTrend(nIndex As Long, sID As String, sName As String) As Object
Set oTrend = oTView.InsertTrend(sID, sName)
nIndex(Long) Index to the trends container. Newly created object is inserted to this index.
sID(String) Trend identifier (maximal length is 64 characters)
sName(String) User name of trend
Return Values:
Returns the reference to the created tvTrend object or if the creation of the object failed, it returns value Nothing. Nothing value can be tested by VBScript Is operator.
The maximal number of trends is 255. If the parameters are not entered or they are set as empty strings (""), then new tvTrend object with default parameters sID and sName will be created. New object with preset parameters can also be created in the Add configurator.
JavaScriptVBScriptSelect and copy to clipboard

var oTView = pMe.Acx;
var oTrend = oTView.InsertTrend(0, "t1", "Temperature");
if (oTrend)
  //.. ok
  //.. error
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