CxCasEditor Methods
The CxCasEditor object contains the following methods:
Configure
The Configure method launches an Alarm Service Configuration dialog box, which is used to configure the CAS.
Syntax
Configure()
Example
The following example launches an Alarm Service Configuration dialog box.
Connect
The Connect method connects the object to a service.
Syntax
Connect(DomainSiteService As String)
Parameters
| Parameter | Required | Description |
|---|---|---|
|
DomainSiteService |
Yes |
The [Domain]Site.Service to which to connect. The domain is optional. The service must be a valid one. |
Remarks
Returns 0 if successful and a non-zero value if the connection failed.
Example
The following example connects the Client object to the CYGDEMO.<SVC> on domain 5410:
Sub
Dim CasEditor
Set CasEditor = CreateObject("CxEditors.CxCasEditor")
CasEditor.Connect("[5410]CYGDEMO.CAS")
End Sub
Copy
The Copy method is used to copy an alarm.
Syntax
Copy(QueueKey As String) As Integer
Parameters
| Parameter | Required | Description |
|---|---|---|
|
QueueKey |
Yes |
The database queue key of the record to copy. |
Remarks
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
| 1 | OK button was pressed. | |
| 2 | Cancel button was pressed. |
Example
The following example launches a Copy or New dialog box for the record "0000012345."
Delete
The Delete method launches a Delete Alarm dialog box for the specified record.
Syntax
Delete(QueueKey As String) As Integer
Parameters
| Parameter | Required | Description |
|---|---|---|
|
QueueKey |
Yes |
The database queue key of the record to delete. |
Remarks
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
| 1 | OK button was pressed. | |
| 2 | Cancel button was pressed. |
Example
The following example launches the specified Delete dialog box for record "0000012345":
Disconnect
The Disconnect method disconnects from the connected service.
Syntax
Disconnect() As Integer
Remarks
The Disconnect method returns 0 if successful and a non-zero value if the disconnect failed.
Example
The following example disconnects the Client object from the connected service, and pops a message box if it is unsuccessful:
Sub Svc.Disconnect()
<SvcClient>.Disconnect()
MsgBox "Service has disconnected."
If <SvcClient>.Disconnect <> 0
Then
MsgBox "Failed to disconnect."
End If
End Sub
Edit
The Edit method launches an Alarm Properties dialog box for the specified point.
Syntax
Edit(QueueKey As String) As Integer
Parameters
| Parameter | Required | Description |
|---|---|---|
|
QueueKey |
Yes |
The point ID for which to edit alarm properties. This must be in the form SITE.SERVICE.POINTID. |
Remarks
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
| 1 | OK button was pressed. | |
| 2 | Cancel button was pressed. |
Example
The following example launches a dialog box for the point with ID "CYGDEMO.SVCMON.0000012345."
New
The New method launches a dialog box to create a new alarm.
Syntax
New() As Integer
Remarks
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
| 1 | OK button was pressed. | |
| 2 | Cancel button was pressed. |
Example
The following example launches the specified editor dialog box:
ShowHistory
The ShowHistory method launches an Alarm History dialog box for the specified point.
Syntax
ShowHistory(Tag As String)
Parameters
| Parameter | Required | Description |
|---|---|---|
|
Tag |
Yes |
The point tag for which to show alarm history. This must be in the form SITE.SERVICE.POINTID:POINTIDLONG. |
Example
The following example launches an Alarm History dialog box for the point with ID "CYGDEMO.SVCMON.0000012345:XOP_TEST55."


