Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

MES Stateful API

Using the Stateful API Functions

To use Stateful API functions in an System Platform script, you need to know the following:

  • Function name
  • Function parameters
  • Purpose and data type of the return result
  • The class to which the function belongs

The MESStatefulAPI_Reference.chm file contains the base Stateful API function.

Base Stateful API functions with more complete descriptions are found under the MESStatefulAPI_Reference node of the help file and should only be used for functional reference when scripting with the Stateful API wrapper.

Note: All API scripting in the System Platform IDE requires the use of the Stateful API wrapper. The base Stateful API library is included in the help file for functional reference.

To determine the API function name and its parameters

  1. Open the Stateful API help file (MESStatefulAPI_Reference.chm).
  2. On the left pane, locate the class or function you want to use. You can also click the Search tab to search the help file for the class or function.
  3. Read the syntax of the [Visual Basic (Declaration)] section in the right pane. For example:        
               
    Public Function IsUserLoggedOntoEnt( _
        ByVal entId As Integer _
     ) As Result

The data types appear underlined in blue. The preceding example includes an integer data type.

Note: The data type of the function result for the new API functions appears as Result. To determine the data type of the result, complete the following procedure.

To determine the data type of the function return result

  1. Open the Stateful Scripting Library help file (MESStatefulAPI_Reference.chm).
  2. On the left pane, locate the function for which you want to determine the return result data type. 



  3. Locate the equivalent legacy method. For example, the aaDataLogs.GetDataLogGrpData() method has the GetDataLogGrpData() legacy method.
  4. In the syntax for Visual Basic, read the data type of the return result. In this example it would be DataSet.
  5. Expand the MES Stateful API Reference, Result Structure, Result Fields nodes in the help file and locate the equivalent data type. The right pane contains further information on the data type.

TitleResults for “How to create a CRG?”Also Available in