Trend Tool – Events

The following table lists and describes events of the Trend Tool.

Event

Description

EventBeginProcessing

EventBeginProcessing runs at the beginning of retrieving values to be trended from the Value History Service (VHS) and updating the trend display.

EventClick

EventClick runs when the user clicks the left mouse button once on the object.

EventEndProcessing

EventEndProcessing runs at the end after processing is finished, or retrieving values to be trended from the Value History Service (VHS) and updating the trend display.

EventInitialize

EventInitialize runs when TheView is started in Run or Preview mode to allow further initialization for the control.

EventMaximize

EventMaximize is run when the user selects Maximize from the right-click menu in Run mode or calls the CxTrend.Maximize method from script. When entering maximization mode, the Maximize parameter value passed in is "True." When exiting maximization mode, the Maximize parameter value passed in is "False."

EventNoteCreated

EventNoteCreated is run before a note is created. This event can be triggered by selecting the Add Note menu option on a trend in Run mode.

Syntax

ObjectCode_EventNoteCreated(ByRef ShowNoteEditor as Boolean, ByRef CreateNote as Boolean, ByRef Note as Note)

Parameters
  • ShowNoteEditor is a modifiable Boolean that determines whether the Note Editor will be displayed (True) or not (False) for the note being created. This parameter could be used to suppress the invocation of the standard Note Editor allowing a custom Note Editor to be displayed when the event is fired.
  • CreateNote is a modifiable Boolean that determines whether to create (True) the note in CygNet or not (False). Does nothing if ShowNoteEditor is set to True.
  • Note is a modifiable CxNote.Note object that represents the note being created.

See also Notes.

Example
Copy
EventNoteCreated
Sub Trend1_EventNoteCreated(ShowNoteEditor, CreateNote, Note)
Dim This : Set This = Trend1
ShowNoteEditor = False
 
    Dim msg : msg = Inputbox("Enter a note summary.", "Note Creation")
     
    If msg = "" Then
        CreateNote = False
        Exit Sub
    End If
     
    note.summary = msg
    note.body = note.summary
    CreateNote = True
End Sub

EventNoteEdited

EventNoteEdited is run before a note is edited. This event can be triggered by double-clicking an annotation on a trend in Run mode.

Syntax

ObjectCode_EventNoteEdited(ByRef ShowNoteEditor as Boolean, ByRef UpdateNote as Boolean, ByRef Note as Note)

Parameters
  • ShowNoteEditor is a modifiable Boolean that determines whether the Note Editor will be displayed (True) or not (False) for the note being edited. This parameter could be used to suppress the invocation of the standard Note Editor allowing a custom Note Editor to be displayed when the event is fired.
  • UpdateNote is a modifiable Boolean that determines whether to update (True) the note in CygNet or not (False). Does nothing if ShowNoteEditor is set to True.
  • Note is a modifiable CxNote.Note object that represents the note being created.

See also Notes.

Example
Copy
EventNoteEdited
Sub Trend1_EventNoteEdited(ShowNoteEditor, UpdateNote, Note)
Dim This : Set This = Trend1
    ShowNoteEditor = False
     
    Dim msg : msg = Inputbox("Enter details to append to the note body.", "Note Edit")
    note.body = note.body + vbCrlf + msg
     
    If msg = "" Then
        UpdateNote = False
        Exit Sub
    End If
     
    UpdateNote = True
 
End Sub

EventNotesChanged

EventNotesChanged is run every time the number of note labels within a Trend Tool view window changes. For example, the event fires when note labels come into scope or fall out of scope, and if the DisplayInformation property Notes option is activated or deactivated.

When a Trend Tool is used in conjunction with a Note Feed Tool, the event triggers changes in the feed that reflect the status of note labels on the trend. For example, note labels are added to or deleted from the Note Feed Tool accordingly.

Syntax

ObjectCode_EventNotesChanged()

Parameters
  • This event takes no parameters.

See also Notes.

EventNoteSelected

EventNoteSelected is run after a note label is selected or cleared.

Syntax

ObjectCode_EventNoteSelected(NoteTag As String, SelectState As Boolean)

Parameters
  • NoteTag returns the unique identifier of the (de)selected note in the format SITE.SERVICE~NOTENUMBER. A note's database key with no preceding zeroes makes up NOTENUMBER.
  • SelectState returns a value that indicates that a note label was selected (True) or cleared (False). Both parameters are required.

See also Notes.

EventPointChange

EventPointChange runs when an unrelated point is updated. This event can significantly reduce initialization time for screens that may contain objects configured for unrelated points. Unrelated points can be registered using an object’s RegisterPointForChangeNotice method, if applicable.

EventPumpData

EventPumpData is a legacy event, and is effectively obsolete. Do not use.

In the past, this event would run when data was "pumped" to TheView.

EventZoom

EventZoom runs when the user left-clicks on a trend and continues to hold down the mouse button while drawing a zoom area.

Back to top