Repository.Model.AddModel

Saves a new cModel object to the Synthesis repository. Returns a Boolean value; when true, indicates that the model now exists in the repository.

Syntax
object.Model.AddModel(m)

where object is a variable that represents a Repository object.

Example
This example creates a new model in the first available project in a Synthesis repository. VBA MyRepository Repository ModelType ModelTypeEnum ModelCategory ModelCategoryEnum ModelName ModelParams(2) ModelType = ModelTypeEnum_Weibull2 ModelCategory = ModelCategoryEnum_Reliability ModelName = ModelParams(0) = 1 ModelParams(1) = 100 newModel cModel newModel.SetModel(ModelType, ModelCategory, ModelName, ModelParams) MyRepository.Project.SetCurrentProject(1) MyRepository.Model.AddModel(newModel)

VB.NET MyRepository Repository newModel cModel(ModelTypeEnum.Weibull2, ModelCategoryEnum.Reliability,, 1, 100) MyRepository.Project.SetCurrentProject(1) MyRepository.Model.AddModel(newModel)