Talk:Synthesis API Reference/Notes: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
(Created page with 'The Synthesis Platform’s ''Application Programming Interface (API)'' enables you to programmatically connect your Synthesis applications and data with other systems and tools u…')
 
No edit summary
Line 9: Line 9:
'''Input/output specific data elements and analyses'''
'''Input/output specific data elements and analyses'''


You can use the API to directly read from or write data to existing Synthesis resources (models, actions, URDs, etc.), system hierarchy items and FMEA records (causes, effects, failures, etc.), or even create new resources and items using data from third-party sources. You can initiate batch processing, as well as create custom solutions loading data into the Synthesis Reliability Data Warehouse (SDW).  
You can use the API to directly read from or write data to existing Synthesis resources (models, actions, URDs, etc.), system hierarchy items and FMEA records (causes, effects, failures, etc.), or even create new resources and items using data from third-party sources. You can initiate batch processing, as well as create custom solutions for loading data into the Synthesis Reliability Data Warehouse (SDW).  
 


'''Obtain calculated results'''
'''Obtain calculated results'''
Line 15: Line 16:
The API allows you to read data from published Synthesis models and obtain calculated results such as the reliability, probability of failure, BX% life, failure rate and mean time.
The API allows you to read data from published Synthesis models and obtain calculated results such as the reliability, probability of failure, BX% life, failure rate and mean time.


==Getting Started==
Here are some requirements to keep in mind before you begin developing for the Synthesis API.
* Install the latest version of the Synthesis application. Choose '''File > Help > Check for Updates''' or download the latest version at http://www.ReliaSoft.com/synthesis/downloads.htm.
:Note that for VBA, the bit version (32- vs. 64-bit) of the Synthesis Platform that you've installed must match your installed version of Microsoft Office. If they do not match, you may see an error related to ActiveX controls. (See [http://www.reliasoft.com/support/rs20024.htm ReliaSoft KB article RS20024].)
* Reference the Synthesis API object library. The object library is located in the folder where the Synthesis application is installed. By default, this folder is at "C:\Program Files\ReliaSoft\Synthesis 10". (For Version 9, it is "C:\Program Files\ReliaSoft\Synthesis 9".)
:For VBA applications, use the SynthesisAPI.tlb library file. For VB.NET applications, use SynthesisAPI.dll.
:For help with referencing the library, see this simple [[Referencing_an_Object_Library|How-To Guide]].


Examples
Sample applications that you can test and tweak yourself are included with your installation of the Synthesis Platform installation. The files are stored on your computer at C:\Users\Public\Public Documents\ReliaSoft\Examples10\API. (For Version 9, see C:\Users\Public\Public Documents\ReliaSoft\Examples\API.) The sample applications are available for Excel VBA and .NET projects. (To run the Excel examples, macros must be enabled. To learn how, see this [http://office.microsoft.com/en-us/excel-help/enable-or-disable-macros-in-office-documents-HA010031071.aspx Microsoft article].)
Sample applications that you can test and tweak yourself are included with your installation of the Synthesis Platform installation. The files are stored on your computer at C:\Users\Public\Public Documents\ReliaSoft\Examples10\API. (For Version 9, see C:\Users\Public\Public Documents\ReliaSoft\Examples\API.)
The sample applications are available for Excel VBA* and .NET projects. They include:
• URDExample.xlsm – Demonstrates how to connect to a Synthesis repository (standard or enterprise), open a project, and add/update new URDs to the project and update them(i.e., the resources that define the reliability/maintainability characteristics of a particular component).
• SDW_Example_Enterprise.xlsm and SDW_Example_Standard.xlsm – Demonstrate how to move data from an Excel sheet to the SDW Synthesis Data Warehouse (SDW) with a click of a button. The first example is for a connection to an enterprise repository (SQL sServer); the second example is for a connection to a standard repository.
• SynthesisAPIExample.sln – This .NET project dDemonstrates several functionalities using *.NET, including:
o How to connect to a Synthesis repository (standard or enterprise) and open a project.
o How to read data from Synthesis resources, as well as obtain calculated results from models.
o How to import a BlockSim XML file. (Requires you to supply the XML file.)
o How to move data to the SDW. (For simplicity, the example transfers a hard-coded value to the SDW.)
*To run the Excel examples, macros must be enabled. To learn how, see this Microsoft article.
Getting Started
Here are some requirements to keep in mind before you begin developing for the Synthesis API.
• We recommend installing or updating your Synthesis application to Install the latest version of the Synthesis application. You can check for the latest version in the software by choosingChoose File > Help > Check for Updates or downloading the latest version at http://www.ReliaSoft.com/synthesis/downloads.htm.
Note that for VBA, the bit version (32- vs. 64-bit) of the Synthesis Platform that you've installed must match your installed version of Microsoft Office. If they do not match, you may see an error related to ActiveX controls. (See ReliaSoft KB article RS20024.)
• You must rReference the Synthesis API object library. The object library is located in the folder where the Synthesis application is installed. By default, this folder is at “C:\Program Files\ReliaSoft\Synthesis 10”. (For Version 9, it is "C:\Program Files\ReliaSoft\Synthesis 9".)  
For VBA applications, use the SynthesisAPI.tlb library file. For VB.NET applications, use SynthesisAPI.dll.
For help with referencing the library, see this simple How-To Guide.
• If you are coding in VB.NET, add an Imports statement for SynthesisAPI. This is assumed in all VB.NET code samples in the Synthesis API tutorials and reference documentation.


We’ve provided tutorials to help you learn how to use the core objects of the Synthesis API and start coding right away. The tutorials include code samples for both VBA and VB.NET. See API Tutorials.
Tutorials are also available to help you learn how to use the core objects of the Synthesis API and start coding right away. The tutorials include code samples for both VBA and VB.NET. See [[API Tutorials]].


If you’re looking toyou need to create BlockSim or XFRACAS XML files for import into a Synthesis repository, the guides are available at:
==Object Library==
• BlockSim XML Formats: xxx
• XFRACAS XML Formats (PDF file): http://www.synthesisplatform.net/XFRACAS/en/XML_XFRACAS9_and_10.pdf
Library
There are five types of core objects in the Synthesis API object library:
There are five types of core objects in the Synthesis API object library:
The Repository object represents the Synthesis repository. When you create a new instance of this class, you will need to specify a Synthesis repository to connect to (either a standard or enterprise repository). Once you have a connection, you can then use the functions in the class to read or write data to the repository, as well as import/export XML files.  
*The [[Repository Class|Repository]] object represents the Synthesis repository. When you create a new instance of this class, you will need to specify a Synthesis repository to connect to (either a standard or enterprise repository). Once you have a connection, you can then use the functions in the class to read or write data to the repository, as well as import/export XML files.  
The Resource objects group represents the Synthesis resources: cAction, cCorrective Task, cScheduled Task, cCrew, cModel, cPool, cURD, cControl and cVariable. Creating one of these objects will instantiate a Synthesis resource that contains the properties for that particular type of resource.
*The following objects represent the Synthesis resources: [[CAction Class|cAction]], [[CCorrectiveTask Class|cCorrective Task]], [[CScheduledTask Class|cScheduled Task]], [[CCrew Class|cCrew]], [[CModel Class|cModel]], [[CPool Class|cPool]], [[CURD Class|cURD]], [[CVariable Class|cVariable]] and [[CXfmeaControl Class|cXfmeaControl]]. Creating one of these objects will instantiate a Synthesis resource that contains the properties for that particular type of resource.
In addition, the cModel class provides methods that enable you to obtain calculated results from a model, such as reliability, probability of failure, etc., from a model.
:In addition, the cModel class provides methods that enable you to obtain calculated results from a model, such as reliability, probability of failure, etc., from a model.
The Synthesis Data Warehouse (SDW) objects group builds data collections for import into the SDW. The RawData object represents a single data point, while the RawDataSet object serves as the data container for the RawData objects.
*The Synthesis Data Warehouse (SDW) objects group builds data collections for the SDW. The [[RawData Class|RawData]] object represents a single data point, while the [[RawDataSet Class|RawDataSet]] object serves as the data container for the RawData objects.
• The FMEA objects group represents the FMEA records: XFMEAFunction, XFMEACause, XFMEAEffect and XFMEAFailure. Creating one of these objects will instantiate an FMEA record that contains the properties for that particular type of record.
*The [[XfmeaItem Class|XfmeaItem]] object represents a system hierarchy item. Instances of this class can be used to store data for a system or assembly, as well as build a multi-level system configuration.
The XFMEAItem object represents a system hierarchy item. Instances of this class can be used to store data for a system or assembly, as well as build a multi-level system configuration.  
*The following objects represent the FMEA records: [[XfmeaFunction Class|XfmeaFunction]], [[XfmeaCause Class|XfmeaCause]], [[XfmeaEffect Class|XfmeaEffect]] and [[XfmeaFailure Class|XfmeaFailure]]. Creating one of these objects will instantiate an FMEA record that contains the properties for that particular type of record.
For an alphabetical listing of all classes and enumerations in the object library, see Full Synthesis API.
For an alphabetical listing of all classes and enumerations in the object library, see [[Full Synthesis API]].

Revision as of 18:43, 9 February 2016

The Synthesis Platform’s Application Programming Interface (API) enables you to programmatically connect your Synthesis applications and data with other systems and tools used within your organization. The 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 .NET applications for your organization.


Transfer and synchronize data via XML

For structured data (such as system hierarchies/BOMs, incidents, work orders and RBD configurations), you can use XML files and the API to manage data transfer and synchronization between BlockSim or XFRACAS and a variety of different PLMs, ERPs, CMMS and other external systems.


Input/output specific data elements and analyses

You can use the API to directly read from or write data to existing Synthesis resources (models, actions, URDs, etc.), system hierarchy items and FMEA records (causes, effects, failures, etc.), or even create new resources and items using data from third-party sources. You can initiate batch processing, as well as create custom solutions for loading data into the Synthesis Reliability Data Warehouse (SDW).


Obtain calculated results

The API allows you to read data from published Synthesis models and obtain calculated results such as the reliability, probability of failure, BX% life, failure rate and mean time.

Getting Started

Here are some requirements to keep in mind before you begin developing for the Synthesis API.

Note that for VBA, the bit version (32- vs. 64-bit) of the Synthesis Platform that you've installed must match your installed version of Microsoft Office. If they do not match, you may see an error related to ActiveX controls. (See ReliaSoft KB article RS20024.)
  • Reference the Synthesis API object library. The object library is located in the folder where the Synthesis application is installed. By default, this folder is at "C:\Program Files\ReliaSoft\Synthesis 10". (For Version 9, it is "C:\Program Files\ReliaSoft\Synthesis 9".)
For VBA applications, use the SynthesisAPI.tlb library file. For VB.NET applications, use SynthesisAPI.dll.
For help with referencing the library, see this simple How-To Guide.

Sample applications that you can test and tweak yourself are included with your installation of the Synthesis Platform installation. The files are stored on your computer at C:\Users\Public\Public Documents\ReliaSoft\Examples10\API. (For Version 9, see C:\Users\Public\Public Documents\ReliaSoft\Examples\API.) The sample applications are available for Excel VBA and .NET projects. (To run the Excel examples, macros must be enabled. To learn how, see this Microsoft article.)

Tutorials are also available to help you learn how to use the core objects of the Synthesis API and start coding right away. The tutorials include code samples for both VBA and VB.NET. See API Tutorials.

Object Library

There are five types of core objects in the Synthesis API object library:

  • The Repository object represents the Synthesis repository. When you create a new instance of this class, you will need to specify a Synthesis repository to connect to (either a standard or enterprise repository). Once you have a connection, you can then use the functions in the class to read or write data to the repository, as well as import/export XML files.
  • The following objects represent the Synthesis resources: cAction, cCorrective Task, cScheduled Task, cCrew, cModel, cPool, cURD, cVariable and cXfmeaControl. Creating one of these objects will instantiate a Synthesis resource that contains the properties for that particular type of resource.
In addition, the cModel class provides methods that enable you to obtain calculated results from a model, such as reliability, probability of failure, etc., from a model.
  • The Synthesis Data Warehouse (SDW) objects group builds data collections for the SDW. The RawData object represents a single data point, while the RawDataSet object serves as the data container for the RawData objects.
  • The XfmeaItem object represents a system hierarchy item. Instances of this class can be used to store data for a system or assembly, as well as build a multi-level system configuration.
  • The following objects represent the FMEA records: XfmeaFunction, XfmeaCause, XfmeaEffect and XfmeaFailure. Creating one of these objects will instantiate an FMEA record that contains the properties for that particular type of record.

For an alphabetical listing of all classes and enumerations in the object library, see Full Synthesis API.