ReliaSoft API Reference: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(219 intermediate revisions by 11 users not shown)
Line 1: Line 1:
{{Template:API|Version 9}}
{{Template:API}}


The Synthesis API provides a library of classes that can be used to accomplish the exact same tasks as within Synthesis, but instead though Microsoft Visual Studio allowing for a more customizable an automatable solution to reliability engineering.
<div style="border:1px solid #D0CDE8; background:#EEEDF7; border-radius:10px; width:auto; margin:0 0 1em 1em; padding:1em; float:right;">
*'''[[API Changelog|Changelog]]'''
*'''[[API Reference Documentation|API Documentation]]
*'''[[API Tutorials|Tutorials]]
</div>


The ReliaSoft ''Application Programming Interface'' (API) enables you to programmatically read and write data to ReliaSoft repositories, as well as analyze and plot data sets from external sources. It is provided for Visual Basic for Applications (VBA) and .NET applications, allowing you to create automated solutions using popular Microsoft Office applications, such as Excel and PowerPoint, or create custom applications for your organization.


The Synthesis API can be used in any development environment that supports ActiveX controls, such as Microsoft’s Visual Basic, Visual C, C#, Access or Excel. 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 user is familiar with programming in that environment.
Implementing the ReliaSoft API allows you to connect data in repositories with the systems and tools used within your organization. It provides the functionality to:


*'''Transfer and synchronize data via XML'''
:Use XML files to manage structured data (such as system hierarchies/BOMs, incidents and work orders) between ReliaSoft’s [https://www.hbkworld.com/en/products/software/analysis-simulation/reliability/xfracas-failure-reporting-analysis-corrective-action-system-fracas-software XFRACAS] and a variety of different PLMs, ERPs, CMMS and other external systems. You can also use XML files to create reliability block diagrams (RBDs) in [https://www.hbkworld.com/en/products/software/analysis-simulation/reliability/blocksim-system-reliability-availability-maintainability-ram-analysis-software BlockSim].
*'''Read/write specific data elements'''
:Read or write data to resources (models, actions, URDs, etc.), system hierarchy items and FMEA records (causes, effects, failures, etc.). Initiate batch data processing and create custom solutions for importing/exporting data from ReliaSoft repositories, as well as load data into the Reliability Data Warehouse (RDW).
*'''Obtain calculated results'''
:Read data from published models and obtain calculated results such as reliability, probability of failure, BX% life, failure rate and mean time.
*'''Analyze data'''
:Use [https://hbkworld.com/en/products/software/analysis-simulation/reliability/weibull-life-data-analysis-software Weibull++'s] analysis and plotting engines to analyze data from third-party sources, and incorporate the functionality into your own custom applications. (Requires a ReliaSoft API license.)


In order to use this library in a project a reference to ReliaSoft Synthesis API Library is required. It’s located in the folder where ReliaSoft Synthesis is installed. By default it is “C:\Program Files\ReliaSoft\Synthesis 9”.
==Prerequisites==
*'''Getting the latest version'''
:The ReliaSoft API consists of a library file that contains the classes, methods and events that provide access to ReliaSoft applications. The file is located in the folder where the ReliaSoft desktop applications are installed. By default, this folder is at "C:\Program Files\ReliaSoft\ReliaSoft 2023." For VBA, you will use the '''ReliaSoftAPI23.tlb''' file; for .NET applications, you will use the '''ReliaSoftAPI23.dll''' file. Prior to Version 2019, the files to use were SynthesisAPI.tlb (VBA) and SynthesisAPI.dll (.NET).


* .NET developers – use SynthesisAPI.dll
:To obtain the latest version of the library file and the ReliaSoft applications, choose '''File > Help > Check for Updates''' or download the latest version from the [https://support.hbmprenscia.com HBM Prenscia Support Portal].


* VB6 / VBA developers – use SynthesisAPI.tlb
*'''Build environment'''
:For Visual Studio projects using Version 10 or 11, at minimum you will need Visual Studio 2010 and the .NET Framework 4.0 runtime. Version 2018 and later require Visual Studio 2015 and the .NET Framework 4.6.1 developer pack and runtime. Starting in Version 2022, .NET Framework 4.8 developer pack is required.


*'''32- vs. 64-bit'''
:For VBA, the bit version of the ReliaSoft applications 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.


== Below is the list of classes and their methods contained in the library. ==
:For Visual Studio projects targeting the .NET Framework 4.5 (or later) and compiled to run an any platform (Any CPU), turn off the '''Prefer 32-bit''' property of the build configuration if you want instances of your application to run as a 64-bit process; otherwise, the application will run as a 32-bit process on both 32- and 64-bit versions of Windows. It is necessary to ensure your application bitness matches the bitness of the ReliaSoft desktop applications installed wherever your application is run due to dependencies on platform-specific libraries.


*'''Running API applications on a server
:If you plan to run the API on a Windows server, you must use [https://help.reliasoft.com/basics/content/reliasoft_installation_and_licensing.htm locally hosted licensing] with Prenscia Access.


*[[WeibullDataSet Class]]
*'''Access to calculations functionality
:Access to Weibull++'s analysis and plotting engines requires a ReliaSoft API license. To obtain a license, please see [https://www.hbkworld.com/en/contact-us/reliasoft-worldwide-contacts contact ReliaSoft].


*[[ALTADataSet Class]]
==Getting Started==


*[[WAPlots Class]]
====Referencing the ReliaSoft API Library File====
<!-- This "onlyinclude" section is transcluded into the API Tutorials page -->
<onlyinclude>To use the ReliaSoft API in your code, you must reference the ReliaSoft API library in your VBA or .NET projects. The file is located in the folder where the ReliaSoft desktop applications are installed. By default for Version 2023, this folder is at "C:\Program Files\ReliaSoft\ReliaSoft 2023." For VBA, you will use the '''ReliaSoftAPI23.tlb''' file; for .NET applications, you will use the '''ReliaSoftAPI23.dll''' file.


*[[Repository Class]]
'''To reference the library in VBA''':
:#Enter the VBA environment by clicking the '''Visual Basic''' command on the Developer tab (If the Developer tab is not visible, see [https://msdn.microsoft.com/en-us/library/bb608625.aspx this Microsoft article]).
:#In the VBA environment, choose '''Tools > References'''.
:#Click '''Browse''' and find the ReliaSoftAPI23.tlb file on your computer. Click '''OK'''.


*[[Common Class]]
'''To reference the library in Visual Studio:'''
:#In the Solution Explorer, right-click the '''References''' node of your project and choose '''Add References'''.
:#In the Reference Manager window, click the '''Browse''' tab and find the ReliaSoftAPI23.dll file on your computer. Click '''OK'''.
:#Edit your project file, either directly using any text editor, or by right-clicking your project and choosing '''Unload Project''', then right-clicking your project again and choosing '''Edit Project File'''
:#Insert the following line just before the last </Project> clause (change the path if necessary):
:::
::::::<Import Project="C:\Program Files\ReliaSoft\ReliaSoft 2023\ReliaSoftAPI.targets" />
:::
:::This will ensure the required files are copied into your project’s destination folder during the build.
:#<li value="5">Save the project file. If you unloaded the project in step 3, right-click the project and choose '''Reload Project'''.</li>
</onlyinclude>
====Examples====
Sample applications that you can test and tweak yourself are included with the ReliaSoft installation. The files are stored on your computer at C:\Users\Public\Public Documents\ReliaSoft\Examples23\API.
The sample applications are available for Excel VBA and VB.NET projects. (To run the Excel examples, macros must be enabled. See [http://office.microsoft.com/en-us/excel-help/enable-or-disable-macros-in-office-documents-HA010031071.aspx this Microsoft article].)


*[[RawData Class]]
====Tutorials====
[[API Tutorials|Tutorials]] are available to help you learn the core objects of the ReliaSoft API and start coding right away. The tutorials include code samples for both VBA and VB.NET.


*[[RawDataSet Class]]
==Object Library ==
Below is a summary of the core objects in the ReliaSoft API library. For an alphabetical listing of all objects in the latest version, see [[API Reference Documentation]].


==Below is a list of classes and enumerations.==
*The <code>'''[[Repository Class|Repository]]'''</code> object represents the ReliaSoft repository. All other objects use the functions in this class to read or write data to the repository. This class also contains the functions for importing/exporting XML files.
*'''[[ALTAStressProfile Class]]
*'''[[ALTASolverModel]]
*'''[[ALTASolverDistribution]]
*'''[[ALTASolverMethod]]
*'''[[ALTASolverLSR]]
*'''[[ALTAGeneralOptions Class]]
*'''[[ALTAAnalysisOptions Class]]
*'''[[ALTAEvents Class|ALTAEvents]]


== Classes / Enums ==
*The following objects represent the ReliaSoft resources. Instances of each class can be used to store data for an existing or new resource. 
*'''[[ModelTypeEnum]]''' {{Template:APIComment|RSFittedModel type.}}
**<code>'''[[CAction Class|cAction]]'''</code>
*'''[[ModelCategoryEnum]]''' {{Template:APIComment|The Category of the RSFittedModel}}
**<code>'''[[CCorrectiveTask Class|cCorrectiveTask]]'''</code>
*'''[[ConfBoundsSides]]''' {{Template:APIComment|Sides of confidence bounds.}}
**<code>'''[[CScheduledTask Class|cScheduledTask]]'''</code>
*'''[[ConfBoundsTypes]]''' {{Template:APIComment|Types of confidence bounds}}
**<code>'''[[CCrew Class|cCrew]]'''</code>
*'''[[ConfBoundsMethods]]''' {{APIComment|Methods of confidence bound.}}
**<code>'''[[CModel Class|cModel]]'''</code>
*'''[[ParamName]]''' {{Template:APIComment|Name}}
**<code>'''[[CPool Class|cPool]]'''</code>
*'''[[ParamBoundsValues Class]]''' {{Template:APIComment|Upper and lower bounds for a model's parameter.}}
**<code>'''[[CProfile Class|cProfile]]'''</code>
*'''[[ParamValues Class]]''' {{APIComment|Model's parameter name and value.}}
**<code>'''[[CURD Class|cURD]]'''</code>
**<code>'''[[CVariable Class|cVariable]]'''</code>
**<code>'''[[CXfmeaControl Class|cXfmeaControl]]'''</code>


===== [[BoundsValues Class]] =====
*The following objects build data sets for the Reliability Data Warehouse (RDW).
*'''[[BoundsValues Class]]''' {{Template:APIComment|Upper and lower bounds.}}
**<code>'''[[RawData Class|RawData]]'''</code> represents a single data point.
*'''[[BoundsValues.Upper]]''' {{Template:APIComment|Sets Upper bound.}}
**<code>'''[[RawDataSet Class|RawDataSet]]'''</code> serves as the data container for <code>RawData</code> objects.
*'''[[BoundsValues.Lower]]''' {{Template:APIComment|Sets Lower bound.}}


===== [[ParamInputInfo Class]] =====
*The <code>'''[[XfmeaItem Class|XfmeaItem]]'''</code> 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.  
*'''[[ParamInputInfo Class]]''' {{Template:APIComment|Class used for parameters input.}}
*'''[[ParamInputInfo.Name]]''' {{Template:APIComment|Parameter input in ParamInputInfo Class for Name}}
*'''[[ParamInputInfo.Min]]''' {{Template:APIComment|Parameter input in ParamInputInfo Class for Min}}
*'''[[ParamInputInfo.Max]]''' {{Template:APIComment|Parameter input in ParamInputInfo Class for Max}}
*'''[[ParamInputInfo.CanEqualMin]]''' {{Template:APIComment|Parameter input in ParamInputInfo Class for CanEqualMin}}
*'''[[ParamInputInfo.CanEqualMax]]''' {{Template:APIComment|Parameter input in ParamInputInfo Class for CanEqualMax}}
*'''[[ParamInputInfo.Value]]''' {{Template:APIComment|Parameter input in ParamInputInfo Class for Value}}


== Classes / Enums ==
*The following objects represent the FMEA records. Instances of each class can be used to store data for an existing or new FMEA analysis.
**<code>'''[[XfmeaFunction Class|XfmeaFunction]]'''</code>
**<code>'''[[XfmeaCause Class|XfmeaCause]]'''</code>
**<code>'''[[XfmeaEffect Class|XfmeaEffect]]'''</code>
**<code>'''[[XfmeaFailure Class|XfmeaFailure]]'''</code>


*'''[[ResetOptionEnum]]''' {{APIComment|Can be used to assign values to ResetOption within CorrectiveTasks}}
*The <code>'''[[WeibullDataSet Class|WeibullDataSet]]'''</code> object represents a Weibull++ data sheet for life data analysis. Instances of this class are used to define a data set and fit a statistical distribution to the data.
*'''[[TaskFrequencyEnum]]''' {{APIComment|Can be used to assign values to TaskFrequency within CorrectiveTasks}}
*'''[[TaskRestorationTypeEnum]]''' {{APIComment|Can be used to assign values to TaskRestorationType within CorrectiveTasks}}
*'''[[TaskClassEnum]]''' {{APIComment|Can be used to assign values to TaskClass within CorrectiveTasks}}


== Resource Classes==
*The <code>'''[[ALTADataSet Class|ALTADataSet]]'''</code> object represents an ALTA data sheet for accelerated life testing data analysis. Instances of this class are used to define a data set, and fit a distribution and life-stress relationship to the data.
*[[cModel Class]]


*[[cAction Class]]
*The <code>'''[[WAPlots Class|WAPlots]]'''</code> object represents a plot based on a <code>cModel</code>, <code>WeibullDataSet</code> or <code>ALTADataSet</code> object. Instances of this class are used to display a plot of the analysis results.
 
*[[cURD Class]]
 
*[[cVariable Class]]
 
*[[cCrew Class]]
 
*[[cPool Class]]
 
*[[cCorrectiveTask Class]]
 
*[[cScheduledTask Class]]
 
== Classes / Enums ==
 
*'''[[WAPlotType]]''' {{APIComment|This includes all possible plot types for Weibull / ALTA plots}}
 
===== [[WAPlotSettings Class|WAPlotSettings]] =====
*'''[[WAPlotSettings Class|WAPlotSettings]]''' {{APIComment|Settings used in Weibull / ALTA plots.}}
*'''[[WAPlotSettings.UserName]]''' {{APIComment|User name that appears on the plot.}}
*'''[[WAPlotSettings.UserCompany]]''' {{APIComment|Company name that appears on the plot.}}
*'''[[WAPlotSettings.AutoscaleX]]''' {{APIComment|Whether the X-scale is calculated automatically.}}
*'''[[WAPlotSettings.AutoscaleY]]''' {{APIComment|Whether the Y-scale is calculated automatically.}}
*'''[[WAPlotSettings.Xmin]]''' {{APIComment|X-scale start. Only used if AutoscaleX is false.}}
*'''[[WAPlotSettings.Xmax]]''' {{APIComment|X-scale end. Only used if AutoscaleX is false.}}
*'''[[WAPlotSettings.Ymin]]''' {{APIComment|Y-scale start. Only used if AutoscaleY is false.}}
*'''[[WAPlotSettings.Ymax]]''' {{APIComment|Y-scale end. Only used if AutoscaleY is false.}}
*'''[[WAPlotSettings.ShowParameterBar]]''' {{APIComment|Whether to show the parameter bars as probability plot.}}
*'''[[WAPlotSettings.ShowParameterScales]]''' {{APIComment|Whether to show the parameter scales as probability plot.}}
*'''[[WAPlotSettings.ShowTargetReliability]]''' {{APIComment|Whether to show the target reliability line.}}
*'''[[WAPlotSettings.ShowTargetTime]]''' {{APIComment|Whether to show the target time line.}}
*'''[[WAPlotSettings.ShowTargetMarker]]''' {{APIComment|Whether to show the a marker on the intersection of target reliability and time lines.}}
*'''[[WAPlotSettings.TargetReliability]]''' {{APIComment|The value of target reliability.}}
*'''[[WAPlotSettings.TargetTime]]''' {{APIComment|The value of target time.}}
*'''[[WAPlotSettings.ShowSuspensionPoints]]''' {{APIComment|Whether to show suspension points on X-axis.}}
*'''[[WAPlotSettings.ShowLeftCensoredPoints]]''' {{APIComment|Whether to show left censored points on X-axis.}}
*'''[[WAPlotSettings.ShowLinesAroundInterval]]''' {{APIComment|Whether to show vertical lines around an interval line.}}
*'''[[WAPlotSettings.AdjustMLEPoints]]''' {{APIComment|Whether to adjust MLE points.}}
*'''[[WAPlotSettings.StraightenGammaLine]]''' {{APIComment|Whether to streighten the probability line for Gamma and G-Gamma distributions.}}
*'''[[WAPlotSettings.ShowNumberInGroup]]''' {{APIComment|Whether to show the number of points in the group for grouped data.}}
*'''[[WAPlotSettings.PlotXPrecision]]''' {{APIComment|Precision for labels on X-axis.}}
*'''[[WAPlotSettings.PlotYPrecision]]''' {{APIComment|Precision for labels on Y-axis.}}
*'''[[WAPlotSettings.PlotXTolerance]]''' {{APIComment|Tolerance for labels on X-axis.}}
*'''[[WAPlotSettings.PlotYTolerance]]''' {{APIComment|Tolerance for labels on Y-axis.}}
*'''[[WAPlotSettings.ConfBounds_SideSelected]]''' {{APIComment|Sides of the confidence bounds.}}
*'''[[WAPlotSettings.ConfBounds_TypesSelected]]''' {{APIComment|Type of the confidence bounds.}}
*'''[[WAPlotSettings.ConfidenceLevel]]''' {{APIComment|Confidence level.}}
*'''[[WAPlotSettings.ContourConfLevel]]''' {{APIComment|Confidence level for contour line plot.}}
*'''[[WAPlotSettings.HistogramInterval]]''' {{APIComment|Interval in histogram plots. Set it to 0 to use the automatically calculated interval.}}
== Classes / Enums ==
 
*'''[[WeibullSolverDistribution]]''' {{Template:APIComment|Available Weibull solver distributions. This includes Weibull, Normal, Exponential, Lognormal, G_Gamma, Logistic, Loglogistic, Gumbel, Gamma, and Bayesian distribution.}}
*'''[[WeibullSolverNumParameters]]''' {{Template:APIComment|Available Weibull solver distribution parameters. This includes MS_1Parameter, MS_2Parameter, MS_3Parameter, and MS_Mixed.}}
*'''[[WeibullSolverMethod]]''' {{Template:APIComment|Available Weibull solver analysis methods. This includes RRX, RRY, and MLE.}}
*'''[[WeibullSolverRankMethod]]''' {{Template:APIComment|Available Weibull solver ranking methods. This includes Median, kaplanMeir, and Actuarial. }}
*'''[[WeibullSolverCBMethod]]''' {{Template:APIComment|Available Weibull solver confidence bounds methods. This includes FisherMatrix, LikeihoodRatio, BetaBinomial, and KTO.}}
*'''[[WeibullBayesianPriorDistribution]]''' {{Template:APIComment|Available Weibull-Bayesian distributions. This includes Normal, Lognormal, Exponential, and Uniform distributions.}}
*'''[[WeibullBayesianResultsOption]]''' {{Template:APIComment|Available Bayesian Weibull-Bayesian result options. This includes Median and Mean.}}
 
===== [[WeibullGeneralOptions Class|WeibullGeneralOptions]] =====
*'''[[WeibullGeneralOptions Class|WeibullGeneralOptions]]''' {{Template:APIComment|Weibull solver general options}}
*'''[[WeibullGeneralOptions.WarnNegLocation|WarnNegLocation]]''' {{Template:APIComment|Whether to generate a warning if location parameter is negative.}}
*'''[[WeibullGeneralOptions.DiscardNegLocation]]''' {{APIComment|For rank regression, resets location parameter to 0. For MLE finds the maximum in the possible domain.}}
*'''[[WeibullGeneralOptions.ResetExpLocation]]''' {{Template:APIComment|For exponential distribution with rank regression, if the location parameter is greater than the first time-to-failure (T1), it is reset to T1.}}
*'''[[WeibullGeneralOptions.Use3PTrueMLE]]''' {{APIComment|Whether to use a full MLE solution on 3-parameter Weibull.}}
*'''[[WeibullGeneralOptions.UseExtendedGGamma]]''' {{APIComment|If set to true, allows the Lambda parameter in the Generalized Gamma distribution to be negative.}}
*'''[[WeibullGeneralOptions.AllowBiasingNormal]]''' {{Template:APIComment|If set to true and using normal distribution (complete data only), corrects the MLE Std (sigma) for biasedness.}}
*'''[[WeibullGeneralOptions.UsePlottedYPoints]]''' {{Template:APIComment|If set to true, uses computed plot points in obtaining D for Kolmogorov-Smirnov test.}}
 
===== [[WeibullAnalysisOptions Class|WeibullAnalysisOptions]] =====
*'''[[WeibullAnalysisOptions Class|WeibullAnalysisOptions]]''' {{Template:APIComment|Weibull solver analysis options}}
*'''[[WeibullAnalysisOptions.Distribution]]''' {{Template:APIComment|Called by ‘sender’ when a message should be displayed.}}
*'''[[WeibullAnalysisOptions.Parameters]]''' {{Template:APIComment|Returns an array containing model parameters and their values.}}
*'''[[WeibullAnalysisOptions.Analysis]]''' {{Template:APIComment|Sets ALTA solver model to MLE}}
*'''[[WeibullAnalysisOptions.RankingMethod]]''' {{Template:APIComment|Sets ranking method}}
*'''[[WeibullAnalysisOptions.UseRSRegression]]''' {{Template:APIComment|Whether or not to use RSRegression}}
*'''[[WeibullAnalysisOptions.ConfBounds]]''' {{Template:APIComment|Sets Confidence Bounds}}
*'''[[WeibullAnalysisOptions.UngroupGroupedData]]''' {{Template:APIComment|Whether or not data is ungrouped data}}
*'''[[WeibullAnalysisOptions.Subpopulations]]''' {{Template:APIComment|Mixed Weibull}}
*'''[[WeibullAnalysisOptions.Weibull_UnbiasParameters]]''' {{Template:APIComment|Whether or not to use Weibull Unbias Parameters -Weibull-2 MLE.}}
*'''[[WeibullAnalysisOptions.Bayesian_PriorDistribution]]''' {{Template:APIComment|Bayesian Distribution}}
*'''[[WeibullAnalysisOptions.Bayesian_Mean]]''' {{Template:APIComment|Sets Bayesian Mean Distribution}}
*'''[[WeibullAnalysisOptions.Bayesian_Std]]''' {{Template:APIComment|Sets Bayesian StdDistribution}}
*'''[[WeibullAnalysisOptions.Bayesian_Lambda]]''' {{Template:APIComment|Sets Bayesian Lambda Distribution}}
*'''[[WeibullAnalysisOptions.Bayesian_MinBeta]]''' {{Template:APIComment|Sets Bayesian Minimum Beta Distribution}}
*'''[[WeibullAnalysisOptions.Bayesian_MaxBeta]]''' {{Template:APIComment|Sets Bayesian Maximum Beta Distribution}}
*'''[[WeibullAnalysisOptions.Bayesian_Results]]''' {{Template:APIComment|Sets Bayesian Results Distribution}}
*'''[[WeibullAnalysisOptions.Bayesian_PriorDistribution]]''' {{Template:APIComment|Bayesian Distribution}}
*'''[[WeibullAnalysisOptions.SortBeforeCalculations]]''' {{Template:APIComment|Whether or not data is sorted before calculations.}}
*'''[[WeibullAnalysisOptions.UseSpecialSort]]''' {{Template:APIComment|Whether or not to sort.}}
 
===== [[WeibullBestFitOptions Class|WeibullBestFitOptions]] =====
*'''[[WeibullBestFitOptions Class|WeibullBestFitOptions]]''' {{Template:APIComment|Whether each weibull distribution is the best fit}}
*'''[[WeibullBestFitOptions.AllowExponential1 ]]''' {{Template:APIComment|Whether Exponential1 is the best fit option}}
*'''[[WeibullBestFitOptions.AllowExponential2 ]]''' {{Template:APIComment|Whether Exponential2 is the best fit option}}
*'''[[WeibullBestFitOptions.AllowNormal ]]''' {{Template:APIComment|Whether Normal is the best fit option}}
*'''[[WeibullBestFitOptions.AllowLognormal ]]''' {{Template:APIComment|Whether Lognormal is the best fit option}}
*'''[[WeibullBestFitOptions.AllowWeibull2 ]]''' {{Template:APIComment|Whether Weibull2 is the best fit option}}
*'''[[WeibullBestFitOptions.AllowWeibull3 ]]''' {{Template:APIComment|Whether Weibull3 is the best fit option}}
*'''[[WeibullBestFitOptions.AllowGamma ]]''' {{Template:APIComment|Whether Gamma is the best fit option}}
*'''[[WeibullBestFitOptions.AllowGenGamma ]]''' {{Template:APIComment|Whether GenGamma is the best fit option}}
*'''[[WeibullBestFitOptions.AllowLogistic ]]''' {{Template:APIComment|Whether Logistic is the best fit option}}
*'''[[WeibullBestFitOptions.AllowLoglogistic ]]''' {{Template:APIComment|Whether Loglogistic is the best fit option}}
*'''[[WeibullBestFitOptions.AllowGumbel ]]''' {{Template:APIComment|Whether Gumbel is the best fit option}}
*'''[[WeibullBestFitOptions.Analysis ]]''' {{Template:APIComment|WSets ALTA solver model to MLE}}
*'''[[WeibullBestFitOptions.RankingMethod ]]''' {{Template:APIComment|Sets ranking method}}
*'''[[WeibullBestFitOptions.UseRSRegression ]]''' {{Template:APIComment|Whether or not to use RSRegression}}
*'''[[WeibullBestFitOptions.ConfBounds ]]''' {{Template:APIComment|Sets Confidence Bounds}}
*'''[[WeibullBestFitOptions.UngroupGroupedData ]]''' {{APIComment|Whether or not data is ungrouped data}}
*'''[[WeibullBestFitOptions.SortBeforeCalculations ]]''' {{Template:APIComment|Whether or not data is sorted before calculations.}}
*'''[[WeibullBestFitOptions.UseSpecialSort ]]''' {{Template:APIComment|Whether or not to sort.}}
 
===== [[WeibullAnalysisResults Class|WeibullAnalysisResults]] =====
*'''[[WeibullAnalysisResults.CorrelationCoefficient]]''' {{Template:APIComment|The Correlation Coefficient value}}
*'''[[WeibullAnalysisResults.LikelihoodValue]]''' {{Template:APIComment|The LikelihoodValue}}
*'''[[WeibullAnalysisResults.PercentNonZero]]''' {{Template:APIComment|The PercentNonZero value}}
 
===== [[WeibullEvents Class|WeibullEvents]] =====
*'''[[WeibullEvents Class|WeibullEvents]]''' {{Template:APIComment|Inherit the class, override its methods and assign its instance to the Events property of a Weibull data set to be able to handle its events.}}
*'''[[WeibullEvents.Message]]''' {{Template:APIComment|Called by ‘sender’ when a message should be displayed.}}
*'''[[WeibullEvents.Question]]''' {{Template:APIComment|Called by ‘sender’ when an answer to the question is required.}}
*'''[[WeibullEvents.GetDistrParameters]]''' {{Template:APIComment|Called by ‘sender’ when additional input is required.}}
*'''[[WeibullEvents.UpdateCalculationProgress]]''' {{Template:APIComment|Called by ‘sender’ when calculation progress should be updated.}}
*'''[[WeibullEvents.ShowCalculationProgress]]''' {{Template:APIComment|Called by ‘sender’ when calculation progress should be shown.}}
*'''[[WeibullEvents.HideCalculationProgress]]''' {{Template:APIComment|Called by ‘sender’ when calculation progress should be hidden.}}

Latest revision as of 20:00, 12 April 2024

APIWiki.png



The ReliaSoft Application Programming Interface (API) enables you to programmatically read and write data to ReliaSoft repositories, as well as analyze and plot data sets from external sources. It is provided for Visual Basic for Applications (VBA) and .NET applications, allowing you to create automated solutions using popular Microsoft Office applications, such as Excel and PowerPoint, or create custom applications for your organization.

Implementing the ReliaSoft API allows you to connect data in repositories with the systems and tools used within your organization. It provides the functionality to:

  • Transfer and synchronize data via XML
Use XML files to manage structured data (such as system hierarchies/BOMs, incidents and work orders) between ReliaSoft’s XFRACAS and a variety of different PLMs, ERPs, CMMS and other external systems. You can also use XML files to create reliability block diagrams (RBDs) in BlockSim.
  • Read/write specific data elements
Read or write data to resources (models, actions, URDs, etc.), system hierarchy items and FMEA records (causes, effects, failures, etc.). Initiate batch data processing and create custom solutions for importing/exporting data from ReliaSoft repositories, as well as load data into the Reliability Data Warehouse (RDW).
  • Obtain calculated results
Read data from published models and obtain calculated results such as reliability, probability of failure, BX% life, failure rate and mean time.
  • Analyze data
Use Weibull++'s analysis and plotting engines to analyze data from third-party sources, and incorporate the functionality into your own custom applications. (Requires a ReliaSoft API license.)

Prerequisites

  • Getting the latest version
The ReliaSoft API consists of a library file that contains the classes, methods and events that provide access to ReliaSoft applications. The file is located in the folder where the ReliaSoft desktop applications are installed. By default, this folder is at "C:\Program Files\ReliaSoft\ReliaSoft 2023." For VBA, you will use the ReliaSoftAPI23.tlb file; for .NET applications, you will use the ReliaSoftAPI23.dll file. Prior to Version 2019, the files to use were SynthesisAPI.tlb (VBA) and SynthesisAPI.dll (.NET).
To obtain the latest version of the library file and the ReliaSoft applications, choose File > Help > Check for Updates or download the latest version from the HBM Prenscia Support Portal.
  • Build environment
For Visual Studio projects using Version 10 or 11, at minimum you will need Visual Studio 2010 and the .NET Framework 4.0 runtime. Version 2018 and later require Visual Studio 2015 and the .NET Framework 4.6.1 developer pack and runtime. Starting in Version 2022, .NET Framework 4.8 developer pack is required.
  • 32- vs. 64-bit
For VBA, the bit version of the ReliaSoft applications 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.
For Visual Studio projects targeting the .NET Framework 4.5 (or later) and compiled to run an any platform (Any CPU), turn off the Prefer 32-bit property of the build configuration if you want instances of your application to run as a 64-bit process; otherwise, the application will run as a 32-bit process on both 32- and 64-bit versions of Windows. It is necessary to ensure your application bitness matches the bitness of the ReliaSoft desktop applications installed wherever your application is run due to dependencies on platform-specific libraries.
  • Running API applications on a server
If you plan to run the API on a Windows server, you must use locally hosted licensing with Prenscia Access.
  • Access to calculations functionality
Access to Weibull++'s analysis and plotting engines requires a ReliaSoft API license. To obtain a license, please see contact ReliaSoft.

Getting Started

Referencing the ReliaSoft API Library File

To use the ReliaSoft API in your code, you must reference the ReliaSoft API library in your VBA or .NET projects. The file is located in the folder where the ReliaSoft desktop applications are installed. By default for Version 2023, this folder is at "C:\Program Files\ReliaSoft\ReliaSoft 2023." For VBA, you will use the ReliaSoftAPI23.tlb file; for .NET applications, you will use the ReliaSoftAPI23.dll file.

To reference the library in VBA:

  1. Enter the VBA environment by clicking the Visual Basic command on the Developer tab (If the Developer tab is not visible, see this Microsoft article).
  2. In the VBA environment, choose Tools > References.
  3. Click Browse and find the ReliaSoftAPI23.tlb file on your computer. Click OK.

To reference the library in Visual Studio:

  1. In the Solution Explorer, right-click the References node of your project and choose Add References.
  2. In the Reference Manager window, click the Browse tab and find the ReliaSoftAPI23.dll file on your computer. Click OK.
  3. Edit your project file, either directly using any text editor, or by right-clicking your project and choosing Unload Project, then right-clicking your project again and choosing Edit Project File
  4. Insert the following line just before the last </Project> clause (change the path if necessary):
<Import Project="C:\Program Files\ReliaSoft\ReliaSoft 2023\ReliaSoftAPI.targets" />
This will ensure the required files are copied into your project’s destination folder during the build.
  1. Save the project file. If you unloaded the project in step 3, right-click the project and choose Reload Project.

Examples

Sample applications that you can test and tweak yourself are included with the ReliaSoft installation. The files are stored on your computer at C:\Users\Public\Public Documents\ReliaSoft\Examples23\API.

The sample applications are available for Excel VBA and VB.NET projects. (To run the Excel examples, macros must be enabled. See this Microsoft article.)

Tutorials

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

Object Library

Below is a summary of the core objects in the ReliaSoft API library. For an alphabetical listing of all objects in the latest version, see API Reference Documentation.

  • The Repository object represents the ReliaSoft repository. All other objects use the functions in this class to read or write data to the repository. This class also contains the functions for importing/exporting XML files.
  • The following objects build data sets for the Reliability Data Warehouse (RDW).
    • RawData represents a single data point.
    • RawDataSet serves as the data container for 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 WeibullDataSet object represents a Weibull++ data sheet for life data analysis. Instances of this class are used to define a data set and fit a statistical distribution to the data.
  • The ALTADataSet object represents an ALTA data sheet for accelerated life testing data analysis. Instances of this class are used to define a data set, and fit a distribution and life-stress relationship to the data.
  • The WAPlots object represents a plot based on a cModel, WeibullDataSet or ALTADataSet object. Instances of this class are used to display a plot of the analysis results.