The CxRsmEditor object contains the following methods:
The Configure method launches a Properties dialog box for the connected RSM service.
Configure()
Example
The following example launches a Properties dialog box using Configure().
|
Sub
CxRsmEditor.Configure
End Sub |
The Connect method connects to the specified RSM service.
Connect(SiteService As String)
| Parameter | Required | Description |
|---|---|---|
|
SiteService |
Yes |
The RSM Site.Service to which you wish to connect. |
Example
The following example connects to CYGDEMO.RSM.
|
Sub
Dim CxRsmEditor Set CxRsmEditor = CreateObject("CxHmiRsm.CxRsmEditor") CxRsmEditor.Connect("CYGDEMO.RSM")
End Sub |
The ControlService method starts, stops, or kills the specified service.
ControlService(SiteService As String, Command As Unsigned Short) As Short
| Parameter | Required | Description |
|---|---|---|
|
SiteService |
Yes |
The Site.Service to control. Note: This service must be an entry in the RSM to which you have connected using Connect(). |
|
Command |
Yes |
The command to send to the service. Possible values are as follows.
|
A nonzero return value indicates an error controlling the service.
Example
The following example connects to CYGDEMO.RSM.
|
Sub
Dim CxRsmEditor Set CxRsmEditor = CreateObject("CxHmiRsm.CxRsmEditor") CxRsmEditor.Connect("CYGDEMO.RSM") CxRsmEditor.ControlService "CYGDEMO.UIS", 1
End Sub |
The Delete method deletes the specified service.
Delete(SiteService As String) As Short
| Parameter | Required | Description |
|---|---|---|
|
SiteService |
Yes |
The Site.Service to delete. Note: This service must be an entry in the RSM to which you have connected using Connect(). |
A nonzero return value indicates an error deleting the service.
Example
The following example deletes the CYGDEMO.OPCIS service.
|
Sub
CxRsmEditor.Delete("CYGDEMO.OPCIS")
End Sub |
The Disconnect method disconnects from the specified RSM service.
Disconnect()
Example
The following example disconnects from CYGDEMO.RSM.
|
Sub
Dim CxRsmEditor Set CxRsmEditor = CreateObject("CxHmiRsm.CxRsmEditor") CxRsmEditor.Connect("CYGDEMO.RSM")
CxRsmEditor.Disconnect
End Sub |
The New method launches a New RSM Entry dialog box for the connected RSM service.
New(SiteService As String) As Short
| Parameter | Required | Description |
|---|---|---|
|
SiteService |
Yes |
The Site.Service returned by this method. This value is the new Site.Service name specified in the "Service Name" edit box of the New RSM Entry dialog box. |
A nonzero return value indicates an error creating a new service.
Example
The following example launches the New RSM Entry dialog box and presents the re:
|
Sub
Dim strSiteService CxRsmEditor.New(strSiteService)
MsgBox strSiteService
End Sub |
The Properties method invokes a Properties dialog box for the selected service(s) if the properties function is enabled.
Properties(SiteService As String) As Short
| Parameter | Required | Description |
|---|---|---|
|
SiteService |
Yes |
The Site.Service for which to display properties. Note: This service must be an entry in the RSM to which you have connected using Connect(). |
A nonzero return value indicates an error displaying the properties.
Example
The following example launches a Properties dialog box for the CYGDEMO.PNT service.
|
Sub
CxRsmEditor.Properties("CYGDEMO.PNT")
End Sub |