SetPenAttribute

Long  SetPenAttribute (long PenHandle, LPCTSTR AttributeName, LPCTSTR AttributeValue);

 

Available (from release):

 

stOCX (V3-03), stPro Automation (V3-03)

 

Return Value:

 

Nonzero if successful otherwise 0.

 

Parameters:

 

Name:

Description:

PenHandle

The handle of the pen whose attribute is to be set.

AttributeName

The name of the Pen attribute that is to be set.

 

Remarks:

 

Call this function to customize how a specific pen is displayed.

 

Attribute information:

 

The following attributes can be set for the given pen.

 

Attribute Name:

Attribute Value(s):

Description:

Updated:

"COLORINDEX"

A numeric value

Defines the index of the Pen Colour that should be used for the pen.

On Data Fetch

"DESCRIPTION"

*

Set the Description for the item assigned to the pen.

On Data Fetch

"DISPLAYDATA"

"YES"

"NO"

Sets whether the plot displays data for this pen.

On Data Fetch

"DISPLAYLINE"

"YES"

"NO"

Sets whether the plot displays a trend line for this pen.

On Data Fetch

"DISPLAYNAME"

*

Set the display name for the pen to the value specified.

On Data Fetch

"EUNITS"

*

The Engineering Units for the item assigned to the pen.

On Data Fetch

"EXPRESSION"

*

The Expression to evaluate for Virtual Items.

 

Note:  This attribute is only applicable to pens which have been defined as having a Data Location of "__VIRT__"

Tip:  The Expression is only 'set' if the it parses successfully.

On Data Fetch

"FILTER"

A floating point value (range from "0.0" to "1.0")

The required filter value to apply to the Pen

On Data Fetch

 

"INVERT"

"YES"

"NO"

Sets whether the pens Y scales are inverted.

On Data Fetch

"LINESTYLE"

"None"

"1 px"

"2 px"

"3 px"

"4 px"

"5 px"

"Dotted"

"Dashed"

"Dash Dot"

"Dash Dot Dot"

Sets the line style for the pen.

On Data Fetch

"ROUND"

 

"YES,round" - Manual

"YES,AUTO" - Auto

"NO"

Set whether rounding should be applied to the Scales for the Pen.

 

Note:  'round' is an integer from -9 to +9, including zero.

Tip:  Fields that contain a delimiter are displayed using the default Field delimiter of ','.  If SetDelimiter has been used, then the user should substitute the ',' for the user specified delimiter

On Data Fetch

"SYMBOLSTYLE"

"Dot"

"Circle"

"Cross"

"Plus"

"Triangle Up"

"Triangle Down"

"Square"

Sets the symbol style for the pen for X/Y chart.

On Data Fetch

"SCALEADD"

 

A numeric value.

 

The value to use for the pens scale Offset field.

On Data Fetch

"SCALEMODE"

"MANUAL,min,max"

"ACTUAL"

"AUTOMATIC"

 

Set the required Scale Mode for the pen.

 

Note:  Lowercase entries should be replaced with the appropriate value, i.e. "MANUAL,2,99".

Tip:  Fields that contain a delimiter are displayed using the default Field delimiter of ','.  If SetDelimiter has been used, then the user should substitute the ',' for the user specified delimiter.

On Data Fetch

"SCALEMULT"

A numeric value.

The value to use for the pens scale Multiplier field.

 

"SCALESTRATEGY"

 

"LINK,penhandle"

"LINKBYALIAS,alias"

"LINKBYNAME,dl,item"

"GROUP,name"

"INDIVIDUAL"

Set the required Scale Strategy for the pen.

 

Note:  Lowercase entries should be replaced with the appropriate value, i.e. "GROUP,MyGroup1".

Tip:  Fields that contain a delimiter are displayed using the default Field delimiter of ','.  If SetDelimiter has been used, then the user should substitute the ',' for the user specified delimiter.

On Data Fetch

 

 

Note:  Attributes and Values are NOT case sensitive.