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

AVEVA™ Plant SCADA

IAlarmPen​.GetHatchColor [Method]

  • Last UpdatedJul 18, 2023
  • 1 minute read

Gets the color used to draw the outline and hatching for the specified state.

Defined As

  • [VBA] GetHatchColor(state as Long) as Long

  • [Cicode] INT GetHatchColor(INT state)

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

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.

Parameters

state

[in] The state for which hatch color to retrieve (0 to 8).

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 hatchColor As Long
.....hatchColor = alarmPen.GetHatchColor(0)
End Sub

[Cicode]

FUNCTION Example(OBJECT hAlarmPen)
.....INT nHatchColor = _ObjectCallMethod(hAlarmPen, "GetHatchColor" , 0);
END

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