SetPoint Button Tool – Events

Specific events have been added to the SetPoint Button Tool which provide the screen builder the opportunity to write VBScript that executes in the CygNet Studio scripting environment when an event fires. The following sample screen lists the order in which the events fire when a screen is first loaded and the Run Group Rollup (MANUAL) SetPoint Button is clicked.

Run Group Rollup (MANUAL)

HyperPoint Script Trigger and Monitor Screen Example

See the Group Rollup HyperPoint script example on the SetPoint Button Applications topic for a more detailed description of this CygNet Studio screen and the use-case it demonstrates.

Events

The following table lists and describes events of the SetPoint Button Tool.

Event

Description

EventContextMenu

EventContextMenu runs when one of the custom context menu items that is defined or overridden by this object is clicked.

EventInitialize

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

EventItemChange

EventItemChange runs when a point property associated with the [DisplayItem] property changes.

For the Text Tool only, this event runs when manual update mode is enabled or disabled for an associated point. Manual update mode is enabled or disabled via the Manual update mode setting on the General page of the PNT editor or via the Edit Current Value dialog box for a current value service point.

EventMouseDown

EventMouseDown runs when the user clicks a mouse button while the cursor is in the control region. See EventMouse Parameters for descriptions of parameters.

EventMouseMove

EventMouseMove runs when the user moves the mouse while the cursor is over the control region. See EventMouse Parameters for descriptions of parameters.

EventMouseUp

EventMouseUp runs when the user lifts a mouse button after having depressed it in the control region. The mouse may have been lifted outside the control region. See EventMouse Parameters for descriptions of parameters.

EventOnStatusValueChange

EventOnStatusValueChange runs when the monitored status point’s value changes. This will only run if a status point is configured.

EventPointChange

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

EventPostSetPoint

EventPostSetPoint runs directly after the SetPoint operation completes. This event runs whether or not the SetPoint operation completed successfully.

This event has two parameters: ErrorCode and ErrorMessage. If the ErrorCode is 0, then the SetPoint operation was successful.

Error Code Error Message
0 (SetPoint operation successful)
-1 An unexpected error occurred during the SetPoint operation.
-2 Unable to resolve the target point tag using the provided configuration.
-3 Unable to resolve point value using provided configuration.
-4 Unable to resolve timestamp using provided configuration.
-5 Unable to resolve the alternate point tag using the provided configuration.
-6 The SetPoint operation timed out.
-7 The value provided is not of the point data type being enforced.
-8

The alternate point's point data type is not same as target point's point data type.

-9 The SetPoint operation completed successfully, but the status operation was canceled because the status point tag could not be resolved using the provided configuration.

-10

The target point's data type does not match the point data type being enforced.

-11

The SetPoint operation completed successfully, but the status operation was canceled because manual update mode setting was unable to be toggled.

-12

The SetPoint operation completed successfully, but the status operation was canceled by the user before completion.
-13

The SetPoint operation completed successfully, but the status operation was canceled because it timed out.

-14

Unable to resolve the analog minimum point using the provided configuration.

-15

Unable to resolve the analog maximum point using the provided configuration.

-16

The target point's data type is not analog, but analog settings are used in the prompt.
-17 The default value is not within the range configured in the prompt analog min/max value settings.
-18 The SetPoint operation completed successfully, but the status operation was canceled because the status initialization timed out.
-19 The SetPoint operation completed successfully, but the status initialization operation was interrupted while verifying the initialization was successful.
-20 The SetPoint operation was interrupted while verifying the SetPoint was successful.
-21 Unable to convert units between default point and target point.
-22 Unable to convert units between analog minimum point and target point.
-23 Unable to convert units between analog maximum point and target point.
-24 Unable to convert units between prompt configuration units and target point units.
-25

The alternate point's point data type is not analog point data type for performing unit conversions.

-26

The point being used for the minimum value must be of analog point data type.

-27

The point being used for the maximum value must be of analog point data type.

EventPreSetPoint

EventPreSetPoint runs directly before the SetPoint operation.

EventPreToolTip

EventPreToolTip gives a script writer an opportunity to create a custom tooltip via script just before the tooltip is shown, when it is needed, and not during screen initialization, which can reduce loading time.

Example
Copy

EventPreToolTip

Sub TextTool1_EventPreToolTip()
    Dim This : Set This = TextTool1
    This.ToolTipText = The tooltip text()
End Sub

Back to top