Popular Post caffrey Posted August 14, 2018 Popular Post Posted August 14, 2018 (edited) Codes a bit rough but should be easy to understand First you need to be using a version of Visual Studio that allows the use of .net 4.6.2 and the project needs to use 4.6.2 Next get the SDK from paxton https://www.paxton.co.uk/download%20files/v6.00SDK.zip Install setupoem.msi (The other is for the client) Create a new vb project and add the paxton reference, usually found it C:\Program Files (x86)\Reference Assemblies\Paxton Access\ filename is Paxton.Net2.OEMClientLibrary.dll Create a form, add a button Double click the button for the code behind, at the top of the .vb add Imports Paxton.Net2.OemClientLibrary Declare these variables :- Dim sServer As String = "your net2 server IP" Dim iServerport As Integer = 8025 Dim mynet2client As New OemClient(sServer, iServerport) If you want a list of operators (Paxton recommend using the OEM Client account) I use this to get the number of the operator Use this code :- Dim myoperatorsobject As IOperators = mynet2client.GetListOfOperators() Dim myoperatorsdictionary As New Dictionary(Of Integer, String) myoperatorsdictionary = myoperatorsobject.UsersDictionary Dim userslistastext As String For Each myoperator In myoperatorsdictionary userslistastext = userslistastext & "User ID: " & myoperator.Key & " Username: " & myoperator.Value & vbCrLf Next MsgBox(userslistastext) You'll want to make a note of the number next to the username - In my case the OEM Client account was -2 If you want a list of doors (and serials) use this code mynet2client.AuthenticateUser(-2, "your password here") ' this is the -2 account I mentioned above Dim mydoors = mynet2client.ViewDoors Dim mydoorsastext As String For Each door In mydoors.DoorsList mydoorsastext = mydoorsastext & "Door Address : " & door.Address & " Door Name: " & door.Name & vbCrLf Next MsgBox(mydoorsastext) Make a note of the doors you would like to open (the serial number) And if you want to open a door this is the code to use mynet2client.AuthenticateUser(-2, "your password again") mynet2client.OpenDoor(your doors serial) Hopefully this should be enough to get you started - this link should also help Edited August 14, 2018 by caffrey 5
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now