OnNewDiaTrendTimeInt

OnNewDiaTrendTimeInt

OnNewDiaTrendTimeInt picture event


Declaration

Global handler:

ENTRY OnNewDiaTrendTimeInt(IN INT _refId, IN TIME _bt, IN TIME _et, IN INT _case, IN INT _subCase) ; script actions END OnNewDiaTrendTimeInt


Special handler:

ENTRY XXX_OnNewDiaTrendTimeInt(IN TIME _bt, IN TIME _et, IN INT _case, IN INT _subCase) ; script actions END XXX_OnNewDiaTrendTimeInt

Parameters

_refId

Parameter of INT type (required for global handler).

XXX

Name of Reference variable connected to graphic object (without the character "_").

_bt, _ec

Displayed time interval (begin time and end time).

_case

Input parameter of INT type (see the table below).

_subCase

Input parameter of INT type - specifies the use of the parameter _case (see the table below).

Description

The picture event is being generated by displayer of Graph type, whenever the time interval displayed in the displayer is being changed. The parameters _bt and _et represents new time interval. The parameter _case, according to the following table, determines the type of the event, when the time interval changed and the parameter _subCase specifies the use of the parameter _case:
 

value of parameter _case

Event type

0

First opening of the graph - immediately after opening the graph, or after calling the function %HI_SetConnectedObj.

1

When the user defines a time interval on time axis. If:

2

Use of a zoom. If:

  • _subCase = 0 - destroy zoom

  • _subCase = 1 - use zoom

3

Time interval change caused by a data shift in live graph. If:

  • _subCase = 0 - shift caused by new values

  • _subCase = 1 - shift caused by deactivation of the button

    in graph window

!!! Calling the function %HI_SetDiagTimes doesn't activate the picture event OnNewDiaTrendTimeInt !!!

Example

The picture event handler for the displayer called Graph with the reference variable _graph.

 

ENTRY graf_OnNewDiagTrendTimeInt(IN TIME _bt, IN TIME _et, IN INT _case, IN INT _subCase) IF _case = 0 THEN ; open displayer of Graph type ELSIF _case=1 THEN ; change of time interval
IF _subCase = 0 THEN ; return to initial interval
ELSIF _subCase = 1 THEN ; definition of a new time interval
ENDIF ELSIF _case = 2 THEN ; use of zoom
IF _subCase = 0 THEN ; destroying zoom ELSIF _subCase = 0 THEN ; use of zoom ENDIF ENDIF END graf_OnNewDiagTrendTimeInt