CModel.SetModel

Defines an existing cModel object.

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

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

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

ModelName
 * String. The model name. (Required)

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

Example
This example assumes that a model with ID#1 exists in a repository. VBA MyRepository Repository AModel cModel MyRepository.Project.SetCurrentProject(1) AModel = MyRepository.Model.GetModel(1) params(1) params(0) = 5 params(1) = 1 AModel.SetModel(ModelTypeEnum_Lognormal, ModelCategoryEnum_Reliability,, params)

VB.NET MyRepository Repository AModel cModel MyRepository.Project.SetCurrentProject(1) AModel = MyRepository.Model.GetModel(1) params(1) params(0) = 5 params(1) = 1 AModel.SetModel(ModelTypeEnum.Lognormal, ModelCategoryEnum.Reliability,, params)