This example on load connects to the default server and sets the IsWriteable radio button to False.
When the button is clicked it obtains an IPISecurity interface from the PIPoints collection of the server, calls IsWriteable, and sets the radio button accordingly.
Build the IPISecurity example as follows:
1. Create a new project and add a reference to the PISDK library.
2. Add the visual elements as shown in the picture. Make sure the numbered element names (label1, list1, Command1, etc.) match those shown.
3. Cut and paste the code below into the project.
Dim srv As Server Private Sub Command1_Click() On Error GoTo handler Dim pisec As IPISecurity Set pisec = srv.PIPoints If pisec.IsWriteable Then Option1(1).Value = True Else Option1(0).Value = True End If Exit Sub handler: MsgBox Err.Description End Sub Private Sub Form_Load() Set srv = Servers.DefaultServer Option1(0).Value = True End Sub