Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

IAlarmPen​.LineColor [Property][Get/Set]

  • Last UpdatedJul 18, 2023
  • 1 minute read

Gets or Sets the color that will be used to draw the pen line.

Defined As

  • [VBA] Long LineColor

  • [Cicode] INT LineColor

  • [C++] OLE_COLOR LineColor

Execution Result

If the property get/set succeeds the return value will be Success. If the return variable is bad then the return value will be InvalidArgument. If the pen is deleted the return value will be GeneralFailure.

Remarks

The color value can be calculated using the following formula:

color = (65536 * Blue) + (256 * Green) + (Red)

where red, green, and blue are 0-255.

Calling Syntax

This example assumes there is a valid alarm pen object to be passed into the example methods.

[VBA]

Sub Example(alarmPen As Object)
.....Dim lineColor As Long
.....`Getting Property value
.....lineColor = alarmPen.LineColor
.....`Setting Property to red
.....alarmPen.LineColor = 255
End Sub

[Cicode]

FUNCTION Example(OBJECT hAlarmPen)
.....// Getting property value
.....INT nLineColor = _ObjectGetProperty(hAlarmPen, "LineColor");
.....// Setting property to red
....._ObjectSetProperty(hAlarmPen, "LineColor", 255);
END

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in