long AddItemViaAliasNameAndColor (LPCTSTR SDR, LPCTSTR AliasName, long SigDigits, long Color);
Available (from release):
stTabular History OCX (V5-0), stTabular History Automation (V5-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. |
Color |
The palette entry number of the pen color to assign to the item. |
Remarks:
Call this function to add and select an item on the display using it's Alias Name whilst also specifying the required 'pen' color for the item. If an item with the same SDR and Alias Name already exist, then this will be selected.
Note: Items added via AddItemViaAliasName will just be assigned the next sequential color from the active color palette.