Application Programming Interface (API)
What is the Application Programming Interface?
The Availability Workbench Application Programming Interface (API) enables users to seamlessly link their databases or external applications to Availability Workbench projects. For example, the API may be used to create a custom link between a CMMS database for importing RCM data into an Availability Workbench project. The custom link may then be used to transfer data from the project back to the CMMS database after the RCM analysis has been completed using Availability Workbench.
In summary, the API allows programmers to directly access project data without using the Availability Workbench user interface.
The Availability Workbench API is available by linking to the Availability Workbench Dynamic Link Library (DLL). This is a .NET assembly that runs under the Microsoft .NET Framework Version 4.0. No separate installation is necessary to access the DLL. The DLL is part of the AvailabilityWorkbench.exe file. You will, however, require a DLL license to access the main functionality of the DLL.
In addition to the Availability Workbench DLL you will also require a .NET development tool such as Microsoft’s Visual Studio.
How the Application Programming Interface Works
The Availability Workbench API provides a DataSet class that may be used to hold project data in memory. A DataSet contains tables, columns and rows. The DataSet constructor automatically constructs all the tables and columns representing the Availability Workbench project schema. However, no rows are added when a DataSet object is created, i.e. a DataSet object contains no data on construction.
A DataSet object may be initially populated with the very minimum of default data for a project by calling the DataSet New method. This method would be called if you are intending to populate a project with data from scratch.
A DataSet object may also be initially populated with data using the DataSet Read method. In this case data is extracted from an existing Availability Workbench project file.
The DataSet class provides methods for writing and reading data to and from the DataSet. Tables and columns in the DataSet are identified by unique string identifiers. These identifiers are listed in the document Availability Workbench DLL Reference Manual.
If you wish to write modified project data to a new or existing Availability Workbench project file then simply call the DataSet Write method. If you wish to validate the data first then call the DataSet Verify method.