ReliaSoft API Reference: Difference between revisions
Chris Kahn (talk | contribs) No edit summary |
John Leavitt (talk | contribs) No edit summary |
||
Line 24: | Line 24: | ||
A complete list of all the classes and enumerations in the Synthesis API is available [[Full Synthesis API|here]]. | A complete list of all the classes and enumerations in the Synthesis API is available [[Full Synthesis API|here]]. | ||
== Formatted Usage Example == | |||
Declare a new repository connection class. | |||
Private WithEvents MyRepository As New Repository | |||
Connect to the Synthesis repository. | |||
Dim Success As Boolean = False | |||
Success = MyRepository.ConnectToSQLRepository("SQLServerPath", "SQLDatabaseName") | |||
Import the XML File to the Synthesis repository. | |||
Dim SuccessImportXML As Boolean | |||
SuccessImportXML = MyRepository.ImportXFRACASXMLFile("XMLFilePath") | |||
{{APIComment|Declare the WeibullDataSet. See [[New WeibullDataSet]] for additional details.}} | |||
Dim WDS as New WeibullDataSet | |||
{{APIComment|Add values to the raw data. See [[WeibullDataSet.AddFailure|AddFailure]] for additional details.}} | |||
WDS.AddFailure(1, 1) | |||
WDS.AddFailure(2, 1) | |||
WDS.AddFailure(3, 1) | |||
{{APIComment|Add values to the raw data. See [[WeibullDataSet.AddSuspension|AddSuspension]] for additional details.}} | |||
WDS.AddSuspension(1, 1) | |||
WDS.AddSuspension(2, 1) | |||
WDS.AddSuspension(3, 1) | |||
{{APIComment|Calculate the WeibullDataSet. See [[WeibullDataSet.Calculate|Calculate]] for additional details.}} | |||
WDS.Calculate | |||
{{APIComment|Get the number of failures. In this example, NumberOfFailures will be 3. See [[WeibullDataSet.FailureCount|FailureCount]] for additional details.}} | |||
Dim NumberOfFailures as Integer | |||
NumberOfFailures = WDS.FailureCount | |||
{{APIComment|Calculate the Fitted Model using the raw data. See [[WeibullDataSet.CalculateBestFit|CalculateBestFit]] for additional details.}} | |||
WDS.CalculateBestFit | |||
{{APIComment|Use the Fitted Model using the raw data. See [[WeibullDataSet.FittedModel|FittedModel]] for additional details.}} | |||
Dim WDSFittedModel as cModel | |||
WDSFittedModel = WDS.FittedModel | |||
{{APIComment|Use ClearDataSet to clear data and fitted model. See [[WeibullDataSet.ClearDataSet|ClearDataSet]] for additional details.}} | |||
'''WDS.ClearDataSet''' | |||
{{APIComment|Get the number of failures. In this example, NumberOfFailures will be 0. See [[WeibullDataSet.FailureCount|FailureCount]] for additional details.}} | |||
Dim NumberOfFailures as Integer | |||
NumberOfFailures = WDS.FailureCount |
Revision as of 21:13, 6 February 2014
Synthesis API can be used to accomplish the exact same tasks as within Synthesis, but through a programmer's own custom-developed code. This allows for a more customizable and automated solution to reliability engineering. The sample code and documentation in this manual have been prepared for the Microsoft Visual Studio 2010 (Visual Basic and .Net) development environment, and we assume that the programmer is familiar with programming in that environment.
In order to use this library in a project, a reference to the ReliaSoft Synthesis API Library is required. The library is located in the folder where ReliaSoft Synthesis is installed. By default, this folder is "C:\Program Files\ReliaSoft\Synthesis 9."
- .NET developers – use SynthesisAPI.dll
- VB6 / VBA developers – use SynthesisAPI.tlb
The Synthesis API includes a rich set of classes/enumerations that allow you to work with any of the following components of the Synthesis Platform:
- Repositories: Allow an application to access and edit Synthesis repositories.
- Weibull++ Standard Folio: Access the analytical capabilities of a Weibull++ standard folio.
- ALTA Standard Folio: Access the analytical capabilities of an ALTA standard folio.
- Models in Weibull++/ALTA: Build models in Weibull++/ALTA.
- Plots in Weibull++/ALTA: Generate plots from a Weibull++/ALTA standard folio.
- Resources: Use these classes to create resources, edit their properties and calculate reliability metrics from fitted models.
- Raw Reliability Data: Work with raw reliability data that can be stored in the Reliability Data Warehouse (RDW).
- Displayed Language: Set the language that will be used for the entire library.
A complete list of all the classes and enumerations in the Synthesis API is available here.
Formatted Usage Example
Declare a new repository connection class.
Private WithEvents MyRepository As New Repository
Connect to the Synthesis repository.
Dim Success As Boolean = False Success = MyRepository.ConnectToSQLRepository("SQLServerPath", "SQLDatabaseName")
Import the XML File to the Synthesis repository.
Dim SuccessImportXML As Boolean SuccessImportXML = MyRepository.ImportXFRACASXMLFile("XMLFilePath")
Declare the WeibullDataSet. See New WeibullDataSet for additional details.
Dim WDS as New WeibullDataSet
Add values to the raw data. See AddFailure for additional details.
WDS.AddFailure(1, 1) WDS.AddFailure(2, 1) WDS.AddFailure(3, 1)
Add values to the raw data. See AddSuspension for additional details.
WDS.AddSuspension(1, 1) WDS.AddSuspension(2, 1) WDS.AddSuspension(3, 1)
Calculate the WeibullDataSet. See Calculate for additional details.
WDS.Calculate
Get the number of failures. In this example, NumberOfFailures will be 3. See FailureCount for additional details.
Dim NumberOfFailures as Integer NumberOfFailures = WDS.FailureCount
Calculate the Fitted Model using the raw data. See CalculateBestFit for additional details.
WDS.CalculateBestFit
Use the Fitted Model using the raw data. See FittedModel for additional details.
Dim WDSFittedModel as cModel WDSFittedModel = WDS.FittedModel
Use ClearDataSet to clear data and fitted model. See ClearDataSet for additional details.
WDS.ClearDataSet
Get the number of failures. In this example, NumberOfFailures will be 0. See FailureCount for additional details.
Dim NumberOfFailures as Integer NumberOfFailures = WDS.FailureCount