cModel.SetModel
Jump to navigation
Jump to search
Member of: SynthesisAPI9.cModel
Sets the model type, category, name and parameters for a new cModel object. Can also be used to replace an existing model.
Syntax
.SetModel(ModelType, ModelCategory, ModelName, ByRef 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 you want to replace with a new model. Dim AModel As New cModel ... 'Specify the definitions for the model. Dim params(1) As Double params(0) = 5 params(1) = 1 'Apply the definition to the model. Call AModel.SetModel(ModelTypeEnum_Lognormal, ModelCategoryEnum_Reliability, "Model1", params)
VB.NET ... 'Add code to create a new model or get an existing model you want to replace with a new model. Dim AModel As New cModel ... 'Specify the definitions for the model. You can use an in-line parameter list to apply the update to the model. AModel.SetModel(ModelTypeEnum.Lognormal, ModelCategoryEnum.Reliability, "Model1", New Double() {1, 100} )