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

AVEVA™ Plant SCADA

IAlarmPen​.SetFillColor [Method]

  • Last UpdatedJul 18, 2023
  • 1 minute read

Sets the color used to fill the pen for the specified state.

Defined As

  • [VBA] SetFillColor(state as Long, color as Long)

  • [Cicode] INT SetFillColor(INT state, INT color)

  • [C++] HRESULT SetFillColor(int state, OLE_COLOR color)

Parameters

state

[in] The state for which you would like to assign a fill color (0 to 8).

color

[in] The fill color that you would like used to for this specific state.

Execution Result

If the function succeeds, the return value will be Success. If the state is out of range, 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 AlarmPen object to be passed into the example methods.

[VBA]

Sub Example(alarmPen As Object)
.....Dim fillColor As Long
.....`Setting FillColor to Red
.....alarmPen.SetFillColor(0, 255)
End Sub

[Cicode]

FUNCTION Example(OBJECT hAlarmPen)
.....// Setting FillColor to Red
....._ObjectCallMethod(hAlarmPen, "SetFillColor" ,0, 255);
END

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