AddItemWithDisplayNameAndColor

long AddItemWithDisplayNameAndColor (LPCTSTR SDR, LPCTSTR DL, LPCTSTR ItemName, long SigDigits, LPCTSTR DisplayName, 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.

DL

The data location of the item.

 

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

ItemName

The name of the item to be added.

SigDigits

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

DisplayName

Name to use on the display dropdown.

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.  The SDR, DL and ItemName parameters uniquely identify the item to be added whilst also specifying the required 'pen' color for the item.. If an item with the same SDR, DL and ItemName already exist then this will be selected.

 

Note:  Items added via AddItemWithDisplayName will just be assigned the next sequential color from the active color palette.