long AddPenViaAliasName (LPCTSTR AliasName, LPCTSTR Reserved, long ColourIndex, long SigDigits);
Available (from release):
stOCX (V3-03), stPro Automation (V3-03)
Return Value:
A handle to the newly created pen if successful otherwise 0.
Parameters:
Name: |
Description: |
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. |
Reserved |
This parameter is reserved for future use. Until such time as it is used an empty string should be supplied. |
ColourIndex |
Determines the pen colour. |
SigDigits |
The number of significant digits to use when displaying the pen. |
Remarks:
Call this function to add a trace to the graph using an Item AliasName . If a pen with the same AliasName already exists then this will be updated.
ColourIndex associates a colour out of the colour palette with the pen.
If the ColourIndex value is outside the set of colours held by the palette, the modulus of the total number of colours in the palette is applied to give a valid value. For example, if the palette contains 10 colours and the call to AddPen had a value of 15 for ColourIndex then the value would be modified to 5 (15 % 10 = 5).
Note: If the pen already exists its colour will be changed to the new colour. A negative or zero value for this argument means the colour will be automatically assigned.
Tip: Calling AddPen will add a pen to the trend, but will not necessarily cause a plot refresh (and therefore a data fetch) to occur. This is by design as it allows multiple pens to be added to the plot simultaneously avoiding unnecessary 'flickering'. To force a data refresh the use should add a call to FetchData once all the pen adjustments have been made.