Trend Tool – Methods

The following table lists and describes methods of the Trend Tool. Methods are accessed using the control's script editor.

Note: If a property or method in the script editor has two forms with the same name, one form exists for legacy support and the other form is current. When possible, use the current form. To select the current form, append .X. to the name of the object to which the property or method applies, and then enter the property or method name. For instance, enter MyObject.X.MyProperty. If a property or method in the script editor has only one form, the X method might or might not apply. The X method column in the table below indicates whether or not a property or method is accessible using the X method.

Method X Method Description

AboutBox

Yes

The AboutBox method displays an About dialog box for the control.

Syntax

AboutBox()

Example

The following examples launch an About dialog box for the control.

Copy
AboutBox
Sub ShowAboutBox()
 
    <Object>.AboutBox
 
End Sub

Sub ButtonTool_EventClick()

    Dim This : Set This = ButtonTool
    <Object>.AboutBox
 
End Sub

AddSeriesDialog

Yes

The AddSeriesDialog method calls the Series dialog box where you can add a new series to your trend.

AlarmAcknowledge

No

The AlarmAcknowledge method acknowledges an alarm.

Cancel

Yes

The Cancel method closes an object and TheView.

CaptureMouse No

The CaptureMouse method forces mouse events to fire. While the mouse is being captured, mouse events will continue to fire on the capturing entity regardless of current mouse position. This function better facilitates dragging objects on views, such as splitters to allow for more flexible layout capabilities. Automatically released on left mouse button release. Context menus are not displayed while capturing. If the function is called on a windowed tool, the function sets capture to that window. If called on a non-windowed tool, it sets capture to TheView and tracks which tool is "captured," altering its mouse event functions to always fire for that tool until released.

ClearMenu

No

The ClearMenu method clears all custom items from the context menu.

Syntax

ClearMenu()

Parameters
  • This method takes no parameters.
Return Values
  • This method returns no values.

ClearNoteSelection Yes

ClearNoteSelection clears every note label selection in a Trend Tool.

Syntax

ClearNoteSelection()

Parameters
  • This method takes no parameters.
Return Values
  • This method returns no values.

See also Notes.

DeleteAllSeries

Yes

The DeleteAllSeries method removes all series from a trend.

DeleteSeries

Yes

The DeleteSeries method clears trend selection(s) from a check list that was created by using the Microsoft ListView control.

DisplayedToConfiguredAxis Yes

Returns the configured (XML) axis index number for a given displayed axis index number.

EditAxesDialog

Yes

The EditAxesDialog method calls the Axis Configuration dialog where you can edit an axis in the trend.

EditSeriesDialog

Yes

The EditSeriesDialog method calls the Series dialog box where you can edit a series in the trend.

Export

Yes

The Export method exports the contents of the grid to a temporary CSV file and opens the file with the default spreadsheet viewer for the user to view and save to disk.

See Exporting Trends.

ExportAsImage

Yes

The ExportAsImage method allows export of an image of a trend.

See Exporting Trends.

FacilityConfig

No  
GetAlarmLimitInfoXml Yes

The GetAlarmLimitInfoXml method returns an XML string of the trend’s alarm limit configuration.

Syntax

GetAlarmLimitInfoXml() As String

GetAxisById Yes The GetAxisById method returns the configured (XML) axis index number for a given axis ID number.
GetDisplayedNotes Yes

GetDisplayedNotes returns an array of DisplayNote objects that are currently displayed in the view window of the Trend Tool.

Syntax

GetDisplayedNotes() As Variant

Parameters
  • This method takes no parameters.
Return Values
  • This method returns an array of DisplayNote objects that are currently displayed on the Trend Tool.

See also Notes.

GetDlgCtrlID

No

The GetDlgCtrlID method returns the numeric resource identifier of the control within TheView.

GetGroup No

The GetGroup method returns the object group to which an object belongs, and returns null if the object does not belong to a group. The GroupID property returns the GroupID. Calling GetGroup is equivalent to calling TheView GetGroupByID and passing the value of the object’s GroupID property, and is provided for convenience.

GetSelectedAlarmLimitSeries Yes

The GetSelectedAlarmLimitSeries method returns an index of series currently selected to have its alarm limits displayed.

Syntax

GetSelectedAlarmLimitSeries() As Short

GetSelectedNote Yes

The GetSelectedNote method returns the SITE.SERVICE~NOTENUMBER of the currently selected note label. A note's database key with no preceding zeroes makes up NOTENUMBER.

Syntax

GetSelectedNote() As String

Parameters
  • This method takes no parameters.
Return Values
  • This method returns the SITE.SERVICE~NOTENUMBER of the selected note. If no note is selected, the method returns an empty string.

See also Notes.

GetTemplateXml

Yes

The GetTemplateXml method returns properties in XML format without Point Tag specifiers.

GetValuesAtTime

Yes

The GetValuesAtTime method returns the value of a series at a time slice.

HistoryAlarms

No

The HistoryAlarms method calls the Alarm History dialog box, which shows the alarm history of an individual alarm, and provides options for showing only particular types of alarm events. See Alarm History for more information.

HistoryValues

No

The HistoryValues method calls the History Values dialog box, which shows all the history records for a given point, including additional information if the history name came from the PNT. See History Records for more information.

IsSelected

No

The IsSelected method indicates if the tool or control is selected. Can be used with [ContextMenuAutoSelect].

LayerName

No

The LayerName method gets the name of the layer on which the object resides.

Maximize

Yes

The Maximize method maximizes the trend. When entering maximization mode, the Maximize parameter value passed in is "True." When exiting maximization mode, the Maximize parameter value passed in is "False."

Move

No

The Move method moves an object by the specified amount, relative to its current position.

OnUpdate

No

The OnUpdate method updates the control to ensure that any property modifications have taken effect.

OnUpdateResize

No

The OnUpdateResize method updates the control to ensure that any modifications to its boundary have taken effect.

OnUpdateStyle

No

The OnUpdateStyle method updates the control to ensure that any modifications to its style properties have taken effect.

PointConfigAlarmSettings

No  

PointConfigAlarmSuppression

No  

PointConfigAll

No  

PointConfigComments

No  

PointConfigQuestionable

No  

Print

Yes

The Print method prints the contents of the control, grid, or viewer. When this method is called, the Print dialog box is shown to allow configuration.

PrintToDefaultPrinter

Yes

The PrintToDefaultPrinter method prints a trend grid to the default printer.

ReadFromFile

Yes

The ReadFromFile method reads the trend from a file.

Refresh

Yes

The Refresh method refreshes the contents of the control from the Current Value Service (CVS).

RegisterPointForChangeNotice

No

The RegisterPointForChangeNotice method registers an unrelated point on a screen that may change its value. Used in conjunction with EventPointChange.

RemoveMenuItem

No  

Restart

Yes

For objects, the Restart method stops and restarts Run mode. For TheFrame/TheView, the Restart method restarts TheView with new site, service, and facility information, if applicable. See also RestartSoft.

RestartSoft

No

For the Group Grid Tool and Trend Tool, the RestartSoft method stops and restarts Run mode. For TheFrame/TheView, the RestartSoft method restarts TheView with new site, service, and facility information, if applicable. See also Restart.

RunInitialize

No

The RunInitialize method runs the object’s EventInitialize event code.

RunPumpData

No This method is not used.

ScrollBackward

Yes

The ScrollBackward method scrolls the data window backward through trend time.

ScrollForward

Yes

The ScrollForward method scrolls the data window forward through trend time.

Select

No

The Select method selects the tool or control. "True" to select, "false" to clear. Can be used with [ContextMenuAutoSelect].

SelectNote Yes

SelectNote selects a note item in the Trend Tool. Both this method and the Note Feed Tool method SetSelection must be called in order for a Trend Tool and a Note Feed Tool to synchronize. This method fires this tool's EventNoteSelected event.

Syntax

SelectNote(NoteTag As String, SelectionState As Boolean)

Parameters
  • NoteTag returns the unique identifier of the selected note in the format SITE.SERVICE~NOTENUMBER.
  • SelectionState returns a Boolean value that indicates that a note label is selected (True) or cleared (False).
Return Values
  • This method returns a Boolean value that indicates that selection was successful (True) or unsuccessful (False).

See also Notes.

SetAlarmLimitInfoXml Yes

The SetAlarmLimitInfoXml method sets the trend’s alarm limit configuration XML string.

Syntax

SetAlarmLimitInfoXml (NewXml As String)

Parameters
  • NewXml sets new XML string of alarm limit configurations.

SetFocus

No

The SetFocus method sets the focus to the control.

SetMaximizedCheck Yes

The SetMaximizedCheck method sets the check next to the Maximized context menu item.

SetMenuItem

No

The SetMenuItem method is called to control an item in the context menu for the tool.

SetSelectedAlarmLimitSeries Yes

The SetSelectedAlarmLimitSeries method changes or sets the series for which to display alarm limits.

Syntax

SetSelectedAlarmLimitSeries (NewIndex As Short)

Parameters
  • New Index sets the index to the new series to display alarm limits.

SetSubMenuItem

No  

ShowConfiguration

No  

ShowCurrentValue

No  

TrendAddPoint

No  

TrendRemovePoint

No  

TrendSinglePoint

No  

TrendSinglePointRollup

No  
UseCygNetMaximize Yes  

WriteToFile

Yes

The WriteToFile method writes the trend to a file.

X No

The X method returns an object that lists properties and methods specific to an ActiveX control. This method is only available for some ActiveX controls.

Back to top