Scripting > CxTrend > CxTrend Object > CxTrend Events

CxTrend Events

The CxTrend object contains the following events:

BeginProcessing

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

Syntax

CxTrend_EventBeginProcessing()

Back to top

Click

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

Syntax

CxTrend_EventClick(SelectedTime)

Parameters

Parameter Description
SelectedTime  
Back to top

EndProcessing

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.

Syntax

CxTrend_EventEndProcessing()

Back to top

Initialize

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

Syntax

CxTrend_EventInitialize()

Back to top

Maximize

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."

Syntax

CxTrend_EventMaximize(Maximize) As Boolean

Parameters

Parameter Description
Maximize A modifiable boolean that enlarges a trend to fill the computer screen (True) or returns the trend to its original size (False).
Back to top

NoteCreated

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

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

Parameters

Parameter Description

ShowNoteEditor

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.

CreateNote

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

A modifiable CxNote.Note object that represents the note being created.

Back to top

NoteEdited

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

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

Parameters

Parameter Description

ShowNoteEditor

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

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

A modifiable CxNote.Note object that represents the note being created.

Back to top

NotesChanged

EventNotesChanged is run every time the number of note labels within a Trend Tool view window changes.

Syntax

CxTrend_EventNotesChanged()

Back to top

NoteSelected

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

Syntax

CxTrend_EventNoteSelected(NoteTag As String, SelectState As Boolean)

Parameters

Parameter Description
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.
Back to top

PumpData

(Obsolete)

Back to top

Zoom

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

Syntax

CxTrend_EventZoom(MinTime As Date, MaxTime As Date, double MinValue, double MaxValue, MinAxis As Integer, MaxAxis As Integer)

Parameters

Parameter Description
MinTime  
MaxTime  
MinValue  
MaxValue  
MinAxis  
MaxAxis  
Back to top

Let us know how we can improve this topic.

CygNet at weatherford.com

© 2020 Weatherford. All rights reserved.