CModel.SetModel: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 9: Line 9:
===Parameters===
===Parameters===
''ModelType''
''ModelType''
:The model type (e.g., 2-parameter Weibull). Can be any [[ModelTypeEnum Enumeration|ModelTypeEnum]] constant. (Required)
:Required. The model type (e.g., 2-parameter Weibull). Can be any [[ModelTypeEnum Enumeration|ModelTypeEnum]] constant.


''ModelCategory''
''ModelCategory''
:The model category (e.g., reliability model). Can be any [[ModelCategoryEnum Enumeration|ModelCategoryEnum]] constant. (Required)
:Required. The model category (e.g., reliability model). Can be any [[ModelCategoryEnum Enumeration|ModelCategoryEnum]] constant.


''ModelName''
''ModelName''
:String. The model name. (Required)
:Required. String. The model name.


''ModelParams()''
''ModelParams()''
:Double. An array of the model's parameters. (Required)
:Required. Double. An array of the model's parameters.





Revision as of 16:53, 25 August 2015

APIWiki.png


Member of: SynthesisAPI9.cModel


Sets the model type, category, name and parameters of an existing cModel object.

Syntax

.SetModel(ModelType, ModelCategory, ModelName, ModelParams())

Parameters

ModelType

Required. The model type (e.g., 2-parameter Weibull). Can be any ModelTypeEnum constant.

ModelCategory

Required. The model category (e.g., reliability model). Can be any ModelCategoryEnum constant.

ModelName

Required. String. The model name.

ModelParams()

Required. Double. An array of the model's parameters.


Example

VBA

 ... 

 'Add code to create a new model or get an existing model. 
 Dim AModel As New cModel
 ... 

 'Define or change the model's properties. 
 Dim params(1) As Double
 params(0) = 5
 params(1) = 1
 Call AModel.SetModel(ModelTypeEnum_Lognormal, ModelCategoryEnum_Reliability, "Model1", params)
VB.NET

 ... 

 'Add code to create a new model or get an existing model. 
 Dim AModel As New cModel
 ... 

 'Define or change the model's properties. 
 AModel.SetModel(ModelTypeEnum.Lognormal, ModelCategoryEnum.Reliability, "Model1", New Double() {1, 100} )