Using the Synthesis API to Transfer Data to a Synthesis Repository
[Editor's Note: This article has been updated since its original publication to reflect a more recent version of the software interface.]
An application programming interface (API) is a set of functions, routines, protocols and other data transmission formats that provide access to a given application through calls, rather than through the user interface. The Synthesis API is written for Visual Basic for Applications (VBA) and Visual Basic.NET. This gives you the ability to create automated solutions using popular Microsoft Office applications, such as Excel and PowerPoint, as well as create custom applications for your organization.
This article will demonstrate one example of how you could use the Synthesis API to transfer data from an Excel worksheet to a Synthesis repository. It assumes some basic working knowledge of VBA. Similar approaches could be used to obtain data from other sources as well.
The Synthesis Data Warehouse (SDW) — formerly called "Reliability Data Warehouse" — is a temporary data storage location in a Synthesis repository. In Version 10, the SDW can connect to XFRACAS, SQL Server, ORACLE or Microsoft Access databases and extract data for use in Weibull++, ALTA or RGA standard folios. You can also use the import/export utilities available in all Synthesis desktop applications to extract data from Excel files or delimited text files. These cover most applications, but what if you want to further customize the data extraction, connect to other third-party data sources, or add controls not available via the software interface?
With a little bit of coding and the Synthesis API, you could create custom solutions for moving data over to a Synthesis repository. To demonstrate this capability, we will use data from an Excel file as an example.
Example life data in an Excel file
The following code demonstrates one example of how you could create a solution for the Excel data shown above. The code first extracts the data from the Excel worksheet. When the extraction is completed, it opens a connection to a Synthesis repository, and then saves the extracted data to the Synthesis Data Warehouse in that repository. To test and tweak the code yourself, download the example for Version 10: API_Example.xlsm (75 KB).
Sample VBA code to transfer data from the Excel file to the SDW
To verify that the data set is successfully imported into the SDW, open Weibull++, choose Home > Synthesis > Synthesis Data Warehouse and then select the new data collection. You can then transfer the data collection from the SDW to a Weibull++ standard folio for life data analysis.
The Synthesis API includes various functions that enable customization and seamless integration of the platform with other systems within your organization. The example demonstrates one simple solution for using the API to customize a data transfer from an Excel worksheet to a Synthesis repository. With skill and creativity, you could create more complex solutions that fit your organization’s particular needs.