Using the Process Analyst > Process Analyst for Developers > Automation Model > IAlarmPen.SetHatchColor [Method]

IAlarmPen.SetHatchColor [Method]

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

Defined As

Parameters

state

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

color

[in] The color that you would like to be used for a specified states hatch.

Execution Result

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

[VBA]

Sub Example(alarmPen As Object)
Dim hatchColor As Long
`Setting HatchColor to Red
alarmPen.SetHatchColor(0, 255)
End Sub

[Cicode]

FUNCTION Example(OBJECT hAlarmPen)
// Setting HatchColor to Red
_ObjectCallMethod(hAlarmPen, "SetHatchColor",0, 255);
END