Update cookies preferences
Promotic

InsertTrend - method of the PmgTrendViewer object

Description:
The 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 method.
Syntax:
Object InsertTrend(Long nIndex, String sID, String sName)
Parameters:
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 value:
Returns the created tvTrend object.
If the creation of the object failed, then returns the value null for JavaScript or Nothing for VBScript. Nothing value can be tested by VBScript Is operator.
Note:
This method is also functional in Web panels.
 
The maximum 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 be created also on the "Trends" tab.
Example:
JavaScriptVBScriptSelect and copy to clipboard

var oTView = pMe;
var oTrend = oTView.InsertTrend(0, "t1", "Temperature");
if (oTrend)
{
// OK
}
else
{
// Error
}

History:
Pm9.00.19: Available for Web panels.
PROMOTIC 9.0.31 SCADA system documentation MICROSYS, spol. s r.o.

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