GetPenAttribute

BSTR GetPenAttribute (long PenHandle, LPCTSTR AttributeName);

 

Available (from release):

 

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

 

Return Value:

 

The value of the requested Attribute if successful, otherwise an empty string.

 

Parameters:

 

Name:

Description:

PenHandle

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

AttributeName

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

 

Remarks:

 

Call this function to determine the display settings for a specific pen.

 

Attribute information:

 

The following attributes can be retrieved for a given pen.

 

Attribute Name:

Attribute Value(s):

Description:

"COLOR"

*

The color used by the Pen in RGB hexadecimal triplet format.

 

Tip:  For example, black will be returned as "000000" and white as "FFFFFF".

"COLORINDEX"

*

Gets the Pen Color Index that is currently being used.

"DESCRIPTION"

*

Gets the Description for the item assigned to the pen.

"DISPLAYDATA"

"YES"

"NO"

Gets whether the plot displays data for this pen.

"DISPLAYLINE"

"YES"

"NO"

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

"DISPLAYNAME"

*

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

"EUNITS"

*

Gets the Engineering Units for the item assigned to the pen.

"EXPRESSION"

*

The expression if the Pen is a Virtual Item.

"EXPRESSIONVALIDATED"

"YES"

"OTHERWISE"

"NO"

"YES" if the pen is a Virtual Item whose expression is valid. "NOT PARSED" if the pen is a Virtual Item that is yet to be parsed, "NO" otherwise.

"FILTER"

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

Gets the filter value that is being applied to the chosen pen.

"INVERT"

"YES"

"NO"

Gets whether the pens Y-scales are inverted.

"ITEMALIAS"

*

Gets the Alias name of the item assigned to the pen.

"ITEMDL"

*

Gets the DL of the item assigned to the pen.

"ITEMNAME"

*

Gets the OPC item that is assigned to the pen.

"ITEMDL"

*

Gets the Data Location for the item that is assigned to the pen.

"LINESTYLE"

"None"

"1 px"

"2 px"

"3 px"

"4 px"

"5 px"

"Dotted"

"Dashed"

"Dash Dot"

"Dash Dot Dot"

Gets the line style of the pen.

"NUMBER"

*

The Pen number of the chosen pen.

"ROUND"

"YES,round" - Manual

"YES,AUTO" - Auto

"NO"

Gets the current rounding mode 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.

"SCALEADD"

*

 

Gets the scale offset for the chosen pen.

"SCALEMAX"

*

Gets the maximum values for the pen's scale.

"SCALEMIN"

*

Gets the minimum value for the pen's scale.

"SCALEMODE"

"MANUAL"

"ACTUAL"

"AUTOMATIC"

 

Gets the scaling mode in effect for the chosen pen.

"SCALEMULT"

*

Gets the scale multiplier for the chosen pen.

"SCALESTRATEGY"

"LINK,dl,item"

"GROUP,name"

"INDIVIDUAL"

Gets the scaling strategy in effect for the chosen pen.

 

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.

"SYMBOLSTYLE"

"Dot"

"Circle"

"Cross"

"Plus"

"Triangle Up"

"Triangle Down"

"Square"

Gets the symbol style the pen will use for X/Y charts.

"VIRTUALTAG"

"YES"

"NO"

Indicates if the Pen is a Virtual Item.

 

Note:  Attributes are NOT case sensitive.