AddItemViaAliasName

long AddItemViaAliasName (LPCTSTR SDR, LPCTSTR AliasName, long SigDigits);

 

Available (from release):

 

stTabular History OCX (V4-0), stTabular History Automation (V4-0)

 

Return Value:

 

A handle to the newly created item if successful otherwise 0.

 

Parameters:

 

Name:

Description:

SDR

The SDR containing the Item to be added.

 

Note:  When connected directly to an OPCServer, the SDR should be set to the same value as the ServerName argument used on the ConnectToDA or ConnectToHDA call.

AliasName

The Alias for the item that is to be trended.

 

Note:  Currently there is no requirement for an Alias within a Data Source to be unique.  If the Alias exists more than once then the first occurrence will be the one that is added to the trend.

SigDigits

The number of significant digits to use when displaying the item.

 

Remarks:

 

Call this function to add and select an item on the display using it's Alias Name.  If an item with the same SDR and Alias Name already exist, then this will be selected.

 

Tip:  This method assigns the next sequential color from the active color palette to the new item.  If a specific color is required, use the AddItemViaAliasNameAndColor method instead.