All Canvas Control Methods
This topic lists all methods, which are available via the Canvas script editor, for all Canvas controls, tools, and objects.
See Accessing Screen Objects for more information about how to view control objects in script in the Canvas application.
Browse by letter: [A] [C] [D] [E] [F] [G] [H] [I] [N] [R] [S] [T] [U] [W]
| Method | Control | Description |
|---|---|---|
| Button |
The AcknowledgeAlarm method acknowledges an alarm. |
|
|
Add |
The Add method adds an item to the Combo Box along with an associated value. |
|
|
AddControl |
The AddControl method dynamically adds a control to a screen object at runtime. See Adding a Control Via Script for more information about using this method. |
|
|
AddFacility |
The AddFacility method dynamically adds a facility to the control runtime. |
|
|
AddLayer |
Map — The AddLayer method dynamically adds a layer to a map at runtime. Screen/Object — The AddLayer method dynamically adds a layer to a screen object at runtime. ExampleThe script call is as follows: where "Layer 1" is the layer name. See Scripting Layers for more information about using this method. |
|
| AddPoint | ||
|
AddRow |
The AddRow method adds a row to the grid. It can include a facility tag. Example |
|
|
AddRows |
The AddRows method adds rows to the grid. It can take an enumerated list of facility tags. Example |
|
|
AddSeries |
The AddSeries method adds a series to the chart via script. See Scripting a Chart Series for more information. |
|
|
AddTab |
The AddTab method adds a tab to the Tab control. |
|
|
ChangeScreen |
The ChangeScreen method swaps one screen for another in the Nested View. |
|
|
CloseScreen |
The CloseScreen method closes a screen. |
|
|
The DeleteSeries method removes a series from a chart via script. |
||
|
Dispose |
The Dispose method releases unmanaged resources used by the application. |
|
|
All |
The Equals method determines whether the specified object is equal to the current object. |
|
|
Export |
The Export method exports data from a grid column, including its summary row, if configured. Supported formats include .csv, .html, and .txt. Export from historical columns is not supported. ExampleThe following example uses a button click event and Edit Box to provide a path to export to. Copy
Export method
|
|
| ExportCvs | Note Grid |
The ExportCsv method exports data from a Note Grid in run mode in .csv format. |
|
ExportToImageFile |
The ExportToImageFile method exports the chart to an image file. |
|
|
The Flip method flips the Detail control when clicked to display a Canvas object of your choosing on the reverse side of the control. |
||
|
Focus |
The Focus method sets the focus to the control to allow further operations. |
|
|
The GetAllScreenControls method retrieves all objects on a screen allowing programmatic interaction with all controls on a screen. |
||
|
GetCell |
The GetCell method retrieves cell data from the grid. It returns a DataCell object. ExampleA DataCell object is in the following namespace: A DataCell has one public method: A DataCell has four public properties: Copy
GetCell method
|
|
|
GetCellValue |
The GetCellValue method retrieves cell values from the grid. Parameters include row and column. Returns a string value. Example |
|
|
GetColorPaletteSubstitution |
||
|
GetColumnDefinition |
The GetColumnDefinition method retrieves the specified column configuration for the grid column. |
|
|
GetData |
The GetData method returns data in a specified data format. |
|
|
GetGlobalDictionary |
The GetGlobalDictionary method returns the dictionary itself, allowing a script writer to manipulate the dictionary directly or inspect its contents. ExampleThe Canvas.Shared class, "CanvasGlobalDictionary," is a See Global Dictionary for more information about using this method. |
|
|
GetHashCode |
All |
The GetHashCode method returns a hash code for the current object. |
|
GetLayer |
The GetLayer method retrieves the specified layer from the map configuration. |
|
|
GetSparklineData |
The GetSparklineData method returns data in a specified data format. |
|
|
GetType |
All |
The GetType method returns the runtime type of the current instance. |
|
The HideLayer method dynamically hides a layer on a screen object at runtime. ExampleThe script call is as follows: where "Layer 1" is the layer name. See Scripting Layers for more information about using this method. |
||
|
Hyperlink |
Hyperlinking is accomplished via script using the Hyperlink method on the sending (hyperlinking) screen and the OpenedViaHyperlink event on the receiving (hyperlinked) screen. Hyperlinking is supported between screens, objects, and Nested Views in Canvas, Canvas.View, and Canvas.View.Lite. The Hyperlink method supports several modes:
Optionally, you can pass a siteService, facility ID, or a data object to a hyperlinked screen. See Hyperlinking Screens for more information about using this method. |
|
|
HyperlinkReplace |
The HyperlinkReplace method replaces the active screen in the control with a facility's associated screen. See Hyperlinking Screens and Navigation by Facility for more information about using this method. |
|
|
HyperlinkReplaceWithNavigation |
The HyperlinkReplaceWithNavigation method replaces the active screen in the control with a facility's associated screen and adds a navigation toolbar. See Hyperlinking Screens and Navigation by Facility for more information about using this method. |
|
|
The IsDataLoaded method is a Boolean function used to determine whether all series have finished loading historical data. |
||
|
IsOrderInTypeConfiguredForDefinition |
The IsOrderInTypeConfiguredForDefinition method checks to see if an order in type (facility ordinal) is configured for the selected relative facility definition. |
|
|
IsScreenOpen |
The IsScreenOpen method checks to see if a screen is open in that instance of Canvas or Canvas.View. This method is case-insensitive. |
|
|
NavigateToScreenByFacility |
The NavigateToScreenByFacility method is included on the screen object and allows you to navigate to a specific screen by selecting a CygNet facility. ExampleThe script call is as follows: The correlation between a facility and its associated screen is done via a facility attribute. You will need to configure the facility attribute that references the associated screen in your CygNet system for each facility using CygNet Explorer. See Navigation by Facility for more information about using this method. |
|
|
The ReadFromGlobalDictionary method reads a complex script object from another screen. See Global Dictionary for more information about using this method. |
||
|
ReceiveNewFacilities |
||
|
ReceiveNewSiteService |
||
|
Refresh |
All |
The Refresh method resets the cache and gets all data for the control from the associated service. |
|
RefreshChart |
The RefreshChart method refreshes the data in the chart from the Value History Service (VHS). |
|
|
RefreshTagChooser |
The RefreshTagChooser method is used to trigger a data refresh at any time or after delayed loading. ExampleThe following example code snippet sets a button (Button1) such that on click it’s going to load the TagChooser1. Copy
RefreshTagChooser method
|
|
|
Remove |
The Remove method removes an item from the Combo Box. |
|
|
RemoveAll |
The RemoveAll method removes all items from the Combo Box. |
|
|
RemoveControl |
The RemoveControl method dynamically removes a control to a screen object at runtime. See Adding a Control Via Script for more information about using this method. |
|
|
ResetMouseCursor |
The ResetMouseCursor method resets the mouse cursor setting for the screen. |
|
|
ResolveRelativeFacility |
The ResolveRelativeFacility method returns the resolved relative facility. |
|
|
ReturnToStartScreen |
The ReturnToStartScreen method returns the Navigator menu to the start screen. |
|
|
Combo Box — The Select method is available to select an item in the control via script. Navigator — The Select method takes in a NavigationItem as a parameter and sets the ActiveItem property to that item and does not return any value. Select allows you to provide navigation items that do not exist in the navigation menu. This is how you select navigation items via script. |
||
|
SelectAll |
The Select All method allows multi-row selection via script. If the SelectionMode property is Multiple or Extended, SelectAll will select all rows in a grid and the SelectedRows property will return the matching DataRow objects. SelectAll will not obviously change the selection if SelectionMode is Single. |
|
|
SelectTab |
The SelectTab method takes an integer and allows selection of items in the Tab control. This is how you select tabs via script. |
|
|
SendFacilityBroadcast |
The SendFacilityBroadcast method broadcasts a facility to any open screen set to receive the facility. See Broadcast a Message Via Script for more information about using this method. |
|
|
SendMessage |
Use the SendMessage method on any nested screen to pass in a message to another nested screen. In addition to messages, you can also send and receive objects which can be used to manipulate the receiving screen, including:
See To communicate between screens in a Nested View via script for more information. |
|
|
SendMessageBroadcast |
The SendMessageBroadcast method broadcasts a message to any open screen set to receive the broadcast. See Broadcast a Message Via Script for more information about using this method. |
|
|
SendParentMessage |
The SendParentMessage method sends a message from a child screen to a parent screen. See Broadcast a Message Via Script for more information about using this method. |
|
|
SendSiteServiceBroadcast |
The SendSiteServiceBroadcast method broadcasts a SiteService to any open screen set to receive the SiteService. See Broadcast a Message Via Script for more information about using this method. |
|
|
SetCellValue |
The SetCellValue method can be used to add custom data to the grid. Parameters include row, column, and string value. Returns a Boolean value to indicate success or failure. Example |
|
|
SetFacilities |
The SetFacilities method sets the list of facilities to be displayed in the control. |
|
|
SetFacilityList |
The SetFacilityList method sets the list of facilities that will be used to instantiate objects in the container. |
|
|
SetImage |
The SetImage method sets the dynamic image to use on the image control. |
|
|
SetLayerVisibility |
The SetLayerVisibility method dynamically shows or hides a layer on a screen object at runtime. ExampleThe script call is as follows: Copy
SetLayerVisibility method
where "Layer 1" is the layer name. See Scripting Layers for more information about using this method. |
|
|
SetLowerAndUpperValue |
The SetLowerAndUpperValue method sets the lower value bound and the upper value bound via script. |
|
|
SetLowerBoundValue |
The SetLowerBoundValue method sets the lower value bound via script. |
|
|
SetMissingImage |
The SetMissingImage method sets the image to display if no image is configured. |
|
|
SetMouseCursor |
The SetMouseCursor method sets the mouse cursor setting for the screen. |
|
|
SetParentFacility |
The SetParentFacility method sets the parent facility that will be used (along with the facility filter) to instantiate objects. |
|
|
SetRowFacility |
The SetRowFacility method sets the facility that will be used for the grid row. |
|
|
SetServiceFilter |
The SetServiceFilter method sets the filter (for a facility attribute-based Tag Chooser) to only show facilities from the provided Current Value Services. |
|
|
SetSiteServiceAndFilter |
The SetSiteServiceAndFilter method assists in modifying the SiteService and Filter properties without causing the control to duplicate work between each property change. |
|
|
SetUpperBoundValue |
The SetUpperBoundValue method sets the upper value bound via script. |
|
|
ShowFacilityFilterDialog |
The ShowFacilityFilterDialog method opens the CygNet Facility Filter dialog box. |
|
|
ShowLayer |
The ShowLayer method dynamically shows a layer on a screen object at runtime. ExampleThe script call is as follows: where "Layer 1" is the layer name. |
|
|
ShowPopup |
The ShowPopup method creates a popup at the mouse location containing an object specified in the parameters. The path can be either a Canvas screen file (.can) or Canvas object file (.cob). ExampleThe script call is as follows: Copy
ShowPopup method
|
|
|
StartSparkline |
The StartSparkline method starts the line in the Sparkline control. |
|
|
All |
The ToString method returns a string that represents the current object. |
|
|
The UpdateDetailsControls method updates the tiled Details controls displayed on the Tile View control. |
||
|
UpdateFacilityTagListFilter |
The UpdateFacilityTagListFilter method changes the facility filter of the grid. The method ensures that the FacilitySource property is <Self>, updates the FacilityTagListFilter property, and then calls on the Refresh method. |
|
|
UpdateMainScreenFacility |
The UpdateMainScreenFacility method updates the facility used for the main screen. The main screen is the Canvas screen that will be displayed when you maximize the tile and display a screen at the top of the Tile View when in run mode. |
|
|
UpdateRangeAbsolute |
The UpdateRangeAbsolute helper method updates chart data for an absolute date range. |
|
|
UpdateRangeRelative |
The UpdateRangeRelative helper method updates chart data for a relative date range. |
|
|
The WriteToGlobalDictionary method saves a complex script object to a global dictionary in the Canvas application’s memory. See Global Dictionary for more information about using this method. |
See Order of Event Execution for information about the order in which events are executed on a screen.

