TN MES107 Example API Call to Start a MES Client Session
Last updated: March 11th, 2025Description
- Author: Brian Schneider
- Published: March 11th, 2025
Details:
Description
The following article from InSource demonstrates shows how to start a Wonderware MES Client Session.
- Author: Michael Walker
- Published: 09/25/2015
- Applies to: Wonderware MES 2015
Details
In the example below note that the me.<Attribute> relative references need to be defined for the script to function.
Dim aaResult As aaMES.Result;
Dim SessionID As Integer ;
Dim ClientType As Integer ;
SessionID = Me.SessionID;
ClientType = aaMES.Core.aaClientTypes.clientOperator;
aaResult = aaMES.Core.aaSession.StartSession(ClientTypes, SessionID);
If aaResult.Success Then
me.resultText = "StartSession PASSED " + SessionID;
Else
me.resultText = "StartSession Failed: " + aaResult.Exception.Message;
EndIf;