View

Type: View

Script class for View types.

Related Types

Properties

PropertyDescription
Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
enabled Enables/disables the view.

Methods

MethodDescription
callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
getParent() Get the parent window/view (if any) of this view.
getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
pxFromDimension(dimension) Convert a dimension string (e.g. "10em", "50dp", "100px") into pixel units, relative to the view object.

Returns the size in pixels.

removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

Subsections of View

AspectSelector

Type: AspectSelector

Extends View

Script class of the AspectSelector view.

Properties

PropertyDescription
Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
enabled Enables/disables the view.
index Change the current selection of the AspectSelector view.

View Properties

Properties defined by the view that are normally editable via properties editor.

PropertyNameDescription
title Title The title of the window.
id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
tooltip Tool Tip Window tool tip.
font_size Font Size Size of the text.
no_match_text No Match Text Text to display if no match is found.
show_customize_button Show Customize Button Wizard to display if customize button is clicked.
customize_button_icon Customize Icon Wizard to display if customize button is clicked.
customize_wizard Customize Wizard Wizard to display if customize button is clicked.

Methods

MethodDescription
callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
getParent() Get the parent window/view (if any) of this view.
getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
pxFromDimension(dimension) Convert a dimension string (e.g. "10em", "50dp", "100px") into pixel units, relative to the view object.

Returns the size in pixels.

removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

Events

EventDescription
afterApply()

Event raised after the AspectSelector value is applied on selection change.

Note that the callback is called within an active undo-scope + calibration update scope.

External scripts can bind to the 'afterApply' event to be notified.

view.on("afterApply", function() { ... });

beforeApply()

Event raised before the AspectSelector value is applied on selection change.

Note that the callback is called within an active undo-scope + calibration update scope.

External scripts can bind to the 'beforeApply' event to be notified.

view.on("beforeApply", function() { ... });

change(index)

Event raised after the AspectSelector selection changed / was applied.

External scripts can bind to the 'change' event to be notified.

view.on("change", function(index, value) { ... });

Button

Type: Button

Extends View

Script class of the Button view.

Properties

PropertyDescription
Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
enabled Enables/disables the view.
text Get/Set the text of the Button view.

View Properties

Properties defined by the view that are normally editable via properties editor.

PropertyNameDescription
label Label Sets the button label. Set this to nothing to get action/wizard text, if defined
show_label Show Label Show the label on the button or just the icon.
icon Icon Button Icon
stretch Stretch Stretch the button to fill the view contents.
script Script Edit the button script.
action Action Action to invoke when clicked. This is more efficient than using a script for the same puropse.
title Title The title of the window.
id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
tooltip Tool Tip Window tool tip.

Methods

MethodDescription
callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
getParent() Get the parent window/view (if any) of this view.
getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
pxFromDimension(dimension) Convert a dimension string (e.g. "10em", "50dp", "100px") into pixel units, relative to the view object.

Returns the size in pixels.

removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

Events

EventDescription
onClick()

Called in Button scripts when the user clicked the Button.

External scripts can bind to the 'click' event to be notified when the user clicks the Button.

button.on("click", function() { ... });

CheckableView

Type: CheckableView

Extends View

Script class of the CheckableView.

Properties

PropertyDescription
Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
enabled Enables/disables the view.
checked Get/Set the check state of the CheckableView view.
text Get/Set the text of the CheckableView view.
value Get/Set the check state of the CheckableView view. Synonymous with 'checked'

Methods

MethodDescription
callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
getParent() Get the parent window/view (if any) of this view.
getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
pxFromDimension(dimension) Convert a dimension string (e.g. "10em", "50dp", "100px") into pixel units, relative to the view object.

Returns the size in pixels.

removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

Events

EventDescription
checked()

Called when the view changed to the checked state.

External scripts can bind to the 'checked' event to be notified.

view.on("checked", function() { ... });

onClick(checked)

Called in CheckableView scripts when the user clicked the CheckableView.

External scripts can bind to the 'click' event to be notified when the user clicks the Button.

view.on("click", function(checked) { ... });

The checked parameter is the new state of the CheckableView.

The 'click' event is emitted when the user clicked the control.

onGetValue() Gets the value that should be displayed by the CheckableView. Accesses to channels and options are tracked automatically, so changes to those values will cause onGetValue to be called again.
onSetValue(checked)

Called whenever the CheckableView state changes either through clicking or by another script setting the checked property.

External scripts can bind to the 'change' event to be notified when the user clicks the Button.

view.on("change", function(checked) { ... });

The checked parameter is the new state of the CheckableView.

The 'change' event is emitted when the checked state changes either through clicking or by another script setting the checked property.

unchecked()

Called when the view changed to the unchecked state.

External scripts can bind to the 'unchecked' event to be notified.

view.on("unchecked", function() { ... });

CheckBox

Type: CheckBox

Extends CheckableView

Script class of the Check Box view.

Properties

PropertyDescription
Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
enabled Enables/disables the view.
checked Get/Set the check state of the CheckableView view.
text Get/Set the text of the CheckableView view.
value Get/Set the check state of the CheckableView view. Synonymous with 'checked'

Methods

MethodDescription
callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
getParent() Get the parent window/view (if any) of this view.
getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
pxFromDimension(dimension) Convert a dimension string (e.g. "10em", "50dp", "100px") into pixel units, relative to the view object.

Returns the size in pixels.

removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

Events

EventDescription
checked()

Called when the view changed to the checked state.

External scripts can bind to the 'checked' event to be notified.

view.on("checked", function() { ... });

onClick(checked)

Called in CheckableView scripts when the user clicked the CheckableView.

External scripts can bind to the 'click' event to be notified when the user clicks the Button.

view.on("click", function(checked) { ... });

The checked parameter is the new state of the CheckableView.

The 'click' event is emitted when the user clicked the control.

onGetValue() Gets the value that should be displayed by the CheckableView. Accesses to channels and options are tracked automatically, so changes to those values will cause onGetValue to be called again.
onSetValue(checked)

Called whenever the CheckableView state changes either through clicking or by another script setting the checked property.

External scripts can bind to the 'change' event to be notified when the user clicks the Button.

view.on("change", function(checked) { ... });

The checked parameter is the new state of the CheckableView.

The 'change' event is emitted when the checked state changes either through clicking or by another script setting the checked property.

unchecked()

Called when the view changed to the unchecked state.

External scripts can bind to the 'unchecked' event to be notified.

view.on("unchecked", function() { ... });

ComboBox

Type: ComboBox

Extends View

Script class of the ComboBox view.

Properties

PropertyDescription
Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
enabled Enables/disables the view.
index Change the current selection of the ComboBox view.
items Set the list of items in the ComboBox. Expects an array of objects. Objects must have the property 'text'.

View Properties

Properties defined by the view that are normally editable via properties editor.

PropertyNameDescription
no_match_text No Match Text Text to display if no match is found.
show_customize_button Show Customize Button Wizard to display if customize button is clicked.
customize_button_icon Customize Icon Wizard to display if customize button is clicked.
customize_wizard Customize Wizard Wizard to display if customize button is clicked.
title Title The title of the window.
id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
tooltip Tool Tip Window tool tip.

Methods

MethodDescription
callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
getParent() Get the parent window/view (if any) of this view.
getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
pxFromDimension(dimension) Convert a dimension string (e.g. "10em", "50dp", "100px") into pixel units, relative to the view object.

Returns the size in pixels.

removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.
getItem(index) Get item at the given index

Events

EventDescription
change(index, value)

Event raised when the combobox selection changed.

External scripts can bind to the 'change' event to be notified.

view.on("change", function(index, value) { ... });

Dial

Type: Dial

Extends View

Script class of the Dial view.

Properties

PropertyDescription
Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
enabled Enables/disables the view.
value Get/Set the value of the dial.

View Properties

Properties defined by the view that are normally editable via properties editor.

PropertyNameDescription
title Title The title of the window.
id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
tooltip Tool Tip Window tool tip.
show_label Show Label Show/hide the label
show_value Show Value Show/hide the value
show_selector Show Selector Show/hide the object selector
show_pgm_button Show Program Button Show/hide the program button for modifier channels.
user_label Label Overrides the default label
value Value Sets the value.
use_extended_limits Use Extended Limits Allow values to be set for extended limits.
show_extended_limits Show Extended Limits Display extended limit range(s).
use_custom_limits Use Custom Limits Use custom minimum / maximum for this control only.
custom_minimum Minimum Custom minimum for this control only.
custom_maximum Maximum Custom maximum for this control only.
script Script Edit the button script.
enable_script Enable Script Enable the script (prevents script overriding direct object connection).
object Object Enable the script (prevents script overriding direct object connection).

Methods

MethodDescription
callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
getParent() Get the parent window/view (if any) of this view.
getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
pxFromDimension(dimension) Convert a dimension string (e.g. "10em", "50dp", "100px") into pixel units, relative to the view object.

Returns the size in pixels.

removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.
program() For Modifier Channels, the program button will apply the modification to the related Map / Table.

Events

EventDescription
onProgramButton()

Called in when the Dial 'program' button (of available) is clicked.

External scripts can bind to the 'program' event to be notified when this event occurs.

view.on("program", function(value) { ... });

onSetValue(value)

Called in when the Dial value has changed.

External scripts can bind to the 'change' event to be notified when the value changes.

view.on("change", function(value) { ... });

GridView

Type: GridView

Extends View

Script class of the GridView view.

Properties

PropertyDescription
Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
enabled Enables/disables the view.
columns Get/Set the columns for the view. Note that the columns may also be set via the 'data' property.
data Get/Set the data for the view. This may be specified as an array of rows or an object, with a 'data' property for the rows (an array). Each row is an array of objects for each cell in the row. The columns may be specified via the 'columns' property, if using an object, specified like a row. Cell objects may have any of the following properties, which may be specified as functions or values.
  • checked - For cells with checkboxes, indicates if cell should be checked. Else uses 'value'.
  • value - the value of the cell.
  • setter - function to accept value from cell editor.
  • editorOptions - If specified, the cell editor will be a drop-down with the specified values. This may be an array of values or an array of objects of the form { text: "text", value: "value" }. A function may also be specified that returns such a structure.
  • text - the text to display in the cell. value will be used if text not provided.
  • option - name or instance of an ecu.option. Many fields are populated from the object, unless overidden.
  • channel - name or instance of an ecu.channel. Many fields are populated from the object, unless overidden.
  • object - instance of an ecu object (e.g. ecu.option). Many fields are populated from the object, unless overidden.
  • description - Description text.
  • toolTip - Tool tip to show when cell is hovered.
  • statusTip - Tip to show in status bar when cell is hovered.
  • userText - User text value.
  • tag - Column tag, used for persistence of column widths.
  • icon - the icon to display in the cell.
  • iconExpanded - the icon to display in the cell if it is expanded (tree views).
  • colSpan - number of columns spanned by the cell.
  • rowSpan - number of rows spanned by the cell.
  • color - the color to display in the cell.
  • backgroundColor - the background color to display in the cell.
  • userValue - User value.
  • sortKey - If sorting the column, this value is used in preference to 'text' or 'value'
  • isSelectable - Indicates if the cell may be selected
  • isEditable - Indicates if the cell may be edited
  • isEnabled - Indicates if the cell is enabled
  • isDisabled - Indicates if the cell is disabled
  • isDefault - Indicates if the cell is a default value
  • isCheckable - Indicates if the cell is checkable (should display a checkbox)
  • isUserCheckDisabled - Indicates if the isCheckable cells checkbox may be checked/unchecked by the user
selected Get/Set the selected sites, as a JSON string, scripts can use JSON.parse.

View Properties

Properties defined by the view that are normally editable via properties editor.

PropertyNameDescription
title Title The title of the window.
id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
tooltip Tool Tip Window tool tip.
show_header Show Header Controls whether the column header is displayed.
column_widths_settings_key Column Widths Settings Key If set, user-configured column widths are stored in the application settings for the given key
selected Selected Selected cells.

Methods

MethodDescription
callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
getParent() Get the parent window/view (if any) of this view.
getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
pxFromDimension(dimension) Convert a dimension string (e.g. "10em", "50dp", "100px") into pixel units, relative to the view object.

Returns the size in pixels.

removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.
refresh() Refresh the view, invalidating any cached values.

Label

Type: Label

Extends View

Script class of the Label view.

Properties

PropertyDescription
Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
enabled Enables/disables the view.
text

Get/Set the text displayed by the label.

Label text can include macro expansion in the form $[User Scalar Name] to display units.

View Properties

Properties defined by the view that are normally editable via properties editor.

PropertyNameDescription
label Label Sets the label text.
drag_target Drag Target Enables mouse-dragging of the label to adjust the value of another view, specified using its 'script ID'.
title Title The title of the window.
id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
tooltip Tool Tip Window tool tip.
text Text Sets the label text.
icon Icon Sets the icon.
padding_x Padding X Padding in the horizontal (x) direction
padding_y Padding Y Padding in the vertical (y) direction
text_align Align Horizontal Text alignment in the horizontal (x) direction
text_valign Align Vertical Text alignment in the vertical (y) direction
font_size Font Size Size of the text.
font_bold Bold Font Enable bold/normal text.
word_wrap Word Wrap Enable word wrapping.
divider_line Divider Line Enable display of divider line (s).

Methods

MethodDescription
callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
getParent() Get the parent window/view (if any) of this view.
getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
pxFromDimension(dimension) Convert a dimension string (e.g. "10em", "50dp", "100px") into pixel units, relative to the view object.

Returns the size in pixels.

removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

MultiSiteView

Type: MultiSiteView

Extends View

Script class of the Multi-Site views (map/table grid/graph).

Properties

PropertyDescription
Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
enabled Enables/disables the view.
canShowCorrectionsDialog Determines if the view supports corrections dialog (e.g. Log Maps).

Methods

MethodDescription
callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
getParent() Get the parent window/view (if any) of this view.
getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
pxFromDimension(dimension) Convert a dimension string (e.g. "10em", "50dp", "100px") into pixel units, relative to the view object.

Returns the size in pixels.

removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.
resetLogMapCapture() Resets Log Map capturing (if supported). This sets all the site weights in the log map to zero.
showCorrectionsDialog() Shows the corrections dialog (if supported)

Notes

Type: Notes

Extends View

Script class of the Notes view.

Properties

PropertyDescription
Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
enabled Enables/disables the view.
text Get/Set the text of the Notes view.

View Properties

Properties defined by the view that are normally editable via properties editor.

PropertyNameDescription
title Title The title of the window.
id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
tooltip Tool Tip Window tool tip.
font_size Font Size Size of the text.
edit_calibration_notes Edit Calibration Notes If enabled then the view edits the notes of the Calibration file.

Methods

MethodDescription
callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
getParent() Get the parent window/view (if any) of this view.
getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
pxFromDimension(dimension) Convert a dimension string (e.g. "10em", "50dp", "100px") into pixel units, relative to the view object.

Returns the size in pixels.

removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

NumberEdit

Type: NumberEdit

Extends View

Script class of the Number Edit view.

Properties

PropertyDescription
Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
enabled Enables/disables the view.
value Get/Set the value of the NumberEdit.

View Properties

Properties defined by the view that are normally editable via properties editor.

PropertyNameDescription
editor_type Editor Type Editor type (Double / Integer / CAN ID etc).
value Value Sets the value.
title Title The title of the window.
id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
tooltip Tool Tip Window tool tip.
font_size Font Size Size of the text.
units_label Units Label Optionally display units to the right of the editor.
hex Hexadecimal Use hexadecimal numeric base (integer editors only)
hex_option Hex Option Show toggleable hexadecimal option (unsigned integer editor)
stretch Stretch Stretch to fill view
valign Vertical Align Vertical alignment of the editor, if not using stretch mode
text_align Text Align Alignment of text in the editor

Methods

MethodDescription
callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
getParent() Get the parent window/view (if any) of this view.
getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
pxFromDimension(dimension) Convert a dimension string (e.g. "10em", "50dp", "100px") into pixel units, relative to the view object.

Returns the size in pixels.

removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

Events

EventDescription
onSetValue(value)

Called in when the NumberEdit value has changed.

External scripts can bind to the 'change' event to be notified when the value changes.

view.on("change", function(value) { ... });

OptionEditor

Type: OptionEditor

Extends View

Script class of the Number Edit view.

Properties

PropertyDescription
Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
enabled Enables/disables the view.
value Get/Set the (real) value of the OptionEditor.

View Properties

Properties defined by the view that are normally editable via properties editor.

PropertyNameDescription
object Object Enable the script (prevents script overriding direct object connection).
title Title The title of the window.
id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
tooltip Tool Tip Window tool tip.
font_size Font Size Size of the text.
stretch Stretch Stretch to fill view
show_dial Show Dial Show dial control on applicable views
show_spin_buttons Show Spin Buttons Show spin buttons on applicable views
show_checkbox Show Checkbox Makes the control a checkbox instead of a drop-down for appropriate objects
checkbox_label Checkbox Label Override the checkbox label. Uses the object name if blank.
show_units Show Units Display units next to the editor

Methods

MethodDescription
callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
getParent() Get the parent window/view (if any) of this view.
getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
pxFromDimension(dimension) Convert a dimension string (e.g. "10em", "50dp", "100px") into pixel units, relative to the view object.

Returns the size in pixels.

removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

Events

EventDescription
change(value)

Called in when the OptionEditor value has changed.

External scripts can bind to the 'change' event to be notified when the value changes.

view.on("change", function(value) { ... });

RadioButton

Type: RadioButton

Extends CheckableView

Script class of the RadioButton view.

Properties

PropertyDescription
Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
enabled Enables/disables the view.
checked Get/Set the check state of the CheckableView view.
text Get/Set the text of the CheckableView view.
value Get/Set the check state of the CheckableView view. Synonymous with 'checked'

Methods

MethodDescription
callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
getParent() Get the parent window/view (if any) of this view.
getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
pxFromDimension(dimension) Convert a dimension string (e.g. "10em", "50dp", "100px") into pixel units, relative to the view object.

Returns the size in pixels.

removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

Events

EventDescription
checked()

Called when the view changed to the checked state.

External scripts can bind to the 'checked' event to be notified.

view.on("checked", function() { ... });

onClick(checked)

Called in CheckableView scripts when the user clicked the CheckableView.

External scripts can bind to the 'click' event to be notified when the user clicks the Button.

view.on("click", function(checked) { ... });

The checked parameter is the new state of the CheckableView.

The 'click' event is emitted when the user clicked the control.

onGetValue() Gets the value that should be displayed by the CheckableView. Accesses to channels and options are tracked automatically, so changes to those values will cause onGetValue to be called again.
onSetValue(checked)

Called whenever the CheckableView state changes either through clicking or by another script setting the checked property.

External scripts can bind to the 'change' event to be notified when the user clicks the Button.

view.on("change", function(checked) { ... });

The checked parameter is the new state of the CheckableView.

The 'change' event is emitted when the checked state changes either through clicking or by another script setting the checked property.

unchecked()

Called when the view changed to the unchecked state.

External scripts can bind to the 'unchecked' event to be notified.

view.on("unchecked", function() { ... });

Scope

Type: Scope

Extends View

Script class of the Scope view.

Properties

PropertyDescription
Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
enabled Enables/disables the view.

View Properties

Properties defined by the view that are normally editable via properties editor.

PropertyNameDescription
title Title The title of the window.
id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
tooltip Tool Tip Window tool tip.
parameter Channel The parameter that will be monitored by the scope.
amplitude Amplitude Vertical amplitude (multiplier)
offset Offset Vertical offset
minimum Minimum Minimum value
maximum Maximum Maximum value
time_per_division Time Per Division (ms) Time scaling factor
draw_axes Draw Axes Draw axes on the scope
draw_legend Draw Legend Draw channels legend
axis_font_size Axis Font Size Draw channels legend
scope_type Scope Type Scope type

Methods

MethodDescription
callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
getParent() Get the parent window/view (if any) of this view.
getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
pxFromDimension(dimension) Convert a dimension string (e.g. "10em", "50dp", "100px") into pixel units, relative to the view object.

Returns the size in pixels.

removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.
clear() Clear the scope data
putData(channel, timestamp, value) Add data to the scope

SensorCalibrationView

Type: SensorCalibrationView

Extends View

Script class of the Sensor Calibration view.

Properties

PropertyDescription
Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
enabled Enables/disables the view.

View Properties

Properties defined by the view that are normally editable via properties editor.

PropertyNameDescription
sensor_table Sensor Table Sets the sensor table that is calibrated by this view.
input_a2d_option Input A2D Option Sets the option that selects the input to this table. For A2Ds this may mean that the pullup value can be automatically configured when offering conversion from resistance to voltage
output_channel Output Channel Indicates the output channel of this table for dependency checking purposes.
output_channel2 Output Channel 2 Indicates a secondary output channel of this table for dependency checking purposes.
interpolate_output Interpolate Output If set, user specified lookup table will be re-interpolated to match the site count of the underlying table. Otherwise the sites will be entered exactly and any remaining cells in the table will be filled with the last value.
optimize_scaling Optimize Scaling If set, and the table has associated scalar/offset options for scaling its output value, then optimize the scalar/offset options to give as close to full-scale resolution on table values as possible.
lower_headroom Lower Headroom When optimizing scaling, this provides some headroom at the lower end of the table output values. In some cases this is needed for detecting sensor errors. If the value is an integer, the headroom is expressed in raw units. If the value has a decimal point then this is a real value in the user defined output units for the calibration. If the value has a % postfix then this is a percentage of the total possible raw range of the table.
upper_headroom Upper Headroom When optimizing scaling, this provides some headroom at the upper end of the table output values. In some cases this is needed for detecting sensor errors. If the value is an integer, the headroom is expressed in raw units. If the value has a decimal point then this is a real value in the user defined output units for the calibration. If the value has a % postfix then this is a percentage of the total possible raw range of the table.
show_resistance Show Resistance Conversion For tables specified in voltage, options to convert from resistance values can be provided.
acceptable_axis_error Acceptable Axis Error % When applying the calibration, if the real value error (set on the axis table) is larger than this percentage then an error shall be raised
acceptable_table_error Acceptable Table Error % When applying the calibration, if the real value error (set on the sensor table itself) is larger than this percentage then an error shall be raised
title Title The title of the window.
id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
tooltip Tool Tip Window tool tip.

Methods

MethodDescription
callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
getParent() Get the parent window/view (if any) of this view.
getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
pxFromDimension(dimension) Convert a dimension string (e.g. "10em", "50dp", "100px") into pixel units, relative to the view object.

Returns the size in pixels.

removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

Sequencer

Type: Sequencer

Extends View

Script class of the Sequencer view.

Related Types

Properties

PropertyDescription
Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
enabled Enables/disables the view.

View Properties

Properties defined by the view that are normally editable via properties editor.

PropertyNameDescription
title Title The title of the window.
id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
tooltip Tool Tip Window tool tip.

Methods

MethodDescription
callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
getParent() Get the parent window/view (if any) of this view.
getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
pxFromDimension(dimension) Convert a dimension string (e.g. "10em", "50dp", "100px") into pixel units, relative to the view object.

Returns the size in pixels.

removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.
clearTrace() Clears the trace view. For long running sequences the trace window can become a performance issue.
get(name) Get the value of a sequencer variable.
gotoItem(name) Direct the sequencer to jump to the sequence item called 'name' once the current item completes.
has(name) Returns 'true' if the sequencer variable has been previously defined.
set(name, value) Set the value of a sequencer variable. The variable will be created if it does not exist.
trace(msg) Trace a message in the info area of the sequencer window.
unset(name) Deletes the sequencer variable. Following this, has(name) will return false.

Subsections of Sequencer

SequencerItem

Type: SequencerItem

An individual Sequencer item - represents a single step in the defined sequence.

Methods

MethodDescription
getProperty(name) Get the value of a property of the sequence item (normally editable via the properties pane of the sequencer view).
setProperty(name, value) Set the value of a property of the sequence item (normally editable via the properties pane of the sequencer view).
trace Trace a message in the info area of the sequencer window.

SignalGenerator

Type: SignalGenerator

Extends View

Script class of the Signal Generator view.

Properties

PropertyDescription
Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
enabled Enables/disables the view.
frequency Get/Set the signal generator frequency, in Hz.
isOutputEnabled Enables/disables the output of the generator.
numCells Get/Set the number of cells in the waveform.
pullupResistance Get/Set the pullup resistance value, in ohms.
waveform Get the waveform object, a table of type EcuObjectScaled. This enables editing of waveform values.

View Properties

Properties defined by the view that are normally editable via properties editor.

PropertyNameDescription
title Title The title of the window.
id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
tooltip Tool Tip Window tool tip.
script Script Edit the signal generator script.

Methods

MethodDescription
callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
getParent() Get the parent window/view (if any) of this view.
getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
pxFromDimension(dimension) Convert a dimension string (e.g. "10em", "50dp", "100px") into pixel units, relative to the view object.

Returns the size in pixels.

removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

Events

EventDescription
onFrequencyChanged()

Called when the frequency of the generator has been changed.

External scripts can bind to the 'frequency_changed' event to be notified when the user clicks the Button.

view.on("frequency_changed", function(frequency) { ... });

The frequency parameter is the new frequency of the generator, in Hz.

ToggleButton

Type: ToggleButton

Extends CheckableView

Script class of the ToggleButton view.

Properties

PropertyDescription
Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
enabled Enables/disables the view.
checked Get/Set the check state of the CheckableView view.
text Get/Set the text of the CheckableView view.
value Get/Set the check state of the CheckableView view. Synonymous with 'checked'

Methods

MethodDescription
callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
getParent() Get the parent window/view (if any) of this view.
getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
pxFromDimension(dimension) Convert a dimension string (e.g. "10em", "50dp", "100px") into pixel units, relative to the view object.

Returns the size in pixels.

removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

Events

EventDescription
checked()

Called when the view changed to the checked state.

External scripts can bind to the 'checked' event to be notified.

view.on("checked", function() { ... });

onClick(checked)

Called in CheckableView scripts when the user clicked the CheckableView.

External scripts can bind to the 'click' event to be notified when the user clicks the Button.

view.on("click", function(checked) { ... });

The checked parameter is the new state of the CheckableView.

The 'click' event is emitted when the user clicked the control.

onGetValue() Gets the value that should be displayed by the CheckableView. Accesses to channels and options are tracked automatically, so changes to those values will cause onGetValue to be called again.
onSetValue(checked)

Called whenever the CheckableView state changes either through clicking or by another script setting the checked property.

External scripts can bind to the 'change' event to be notified when the user clicks the Button.

view.on("change", function(checked) { ... });

The checked parameter is the new state of the CheckableView.

The 'change' event is emitted when the checked state changes either through clicking or by another script setting the checked property.

unchecked()

Called when the view changed to the unchecked state.

External scripts can bind to the 'unchecked' event to be notified.

view.on("unchecked", function() { ... });

UnitPreferenceView

Type: UnitPreferenceView

Extends View

Script class of the UnitPreferenceView.

Properties

PropertyDescription
Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
enabled Enables/disables the view.
unit Get/Set the selected unit script ID.
unitPreference Get/Set the selected unit preference name (User Scalar)

View Properties

Properties defined by the view that are normally editable via properties editor.

PropertyNameDescription
unit_preference Unit Preference Selects which unit preference (User Scalar) this view controls.
unit_preference_name Unit Preference Name Selects which unit preference (User Scalar) this view controls. This is the name and may refer to a user scalar that does not exist so that the layout can be used for multiple ECU types that may differ in terms of names
units Units Sets the units script name.
title Title The title of the window.
id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
tooltip Tool Tip Window tool tip.

Methods

MethodDescription
callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
getParent() Get the parent window/view (if any) of this view.
getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
pxFromDimension(dimension) Convert a dimension string (e.g. "10em", "50dp", "100px") into pixel units, relative to the view object.

Returns the size in pixels.

removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

Events

EventDescription
change(unit)

Called whenever the selected unit changes either through clicking or by a script setting it.

Scripts can bind to the 'change' event to be notified when the selection changes.

view.on("change", function(unit) { ... });

The unit parameter is the script ID of the selected units (e.g. voltage:V)

UnitSelector

Type: UnitSelector

Extends View

Script class of the UnitSelector view.

Properties

PropertyDescription
Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
enabled Enables/disables the view.
unit Get/Set the selected unit script ID.

View Properties

Properties defined by the view that are normally editable via properties editor.

PropertyNameDescription
units Units Sets the units script name.
title Title The title of the window.
id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
tooltip Tool Tip Window tool tip.

Methods

MethodDescription
callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
getParent() Get the parent window/view (if any) of this view.
getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
pxFromDimension(dimension) Convert a dimension string (e.g. "10em", "50dp", "100px") into pixel units, relative to the view object.

Returns the size in pixels.

removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.

Events

EventDescription
change(unit)

Called whenever the selected unit changes either through clicking or by a script setting it.

Scripts can bind to the 'change' event to be notified when the selection changes.

view.on("change", function(unit) { ... });

The unit parameter is the script ID of the selected units (e.g. voltage:V)

selection(selected)

Called whenever the 'base' (unsorted) selection changes.

WizardListView

Type: WizardListView

Extends View

Script class of the WizardListView.

Properties

PropertyDescription
Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view.
enabled Enables/disables the view.
index Change the current selection of the WizardListView view.
items Change the current selection of the WizardListView view.

View Properties

Properties defined by the view that are normally editable via properties editor.

PropertyNameDescription
title Title The title of the window.
id Script ID The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
tooltip Tool Tip Window tool tip.

Methods

MethodDescription
callListener(eventName, [args]) Calls all event listeners for the given event name, useful for testing.
getParent() Get the parent window/view (if any) of this view.
getViewProperties() Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view.
getViewProperty(id) Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view.
on(eventName, callback) Adds an event listener for the given event name. e.g. view.on("click", function() { ... });
pxFromDimension(dimension) Convert a dimension string (e.g. "10em", "50dp", "100px") into pixel units, relative to the view object.

Returns the size in pixels.

removeAllListeners([eventName]) Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed.
removeListener(eventName, callback) Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback);
setViewProperty(id, value) Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view.