Add New Synthesis Resources to a Repository/VBA: Difference between revisions
Jump to navigation
Jump to search
Kate Racaza (talk | contribs) (Created page with '{{Template:API}} ==Tutorial: Add a New Synthesis Resource to a Repository== Below is the VBA version of the tutorial. '''VBA'''…') |
(No difference)
|
Revision as of 18:22, 27 April 2016
Tutorial: Add a New Synthesis Resource to a Repository
Below is the VBA version of the tutorial.
VBA Sub Main() 'Declare a new cModel object. Dim Amodel As New cModel 'Define the model. Dim ModelType As ModelTypeEnum Dim ModelCategory As ModelCategoryEnum Dim ModelName As String Dim ModelParams(1) As Double ModelType = ModelTypeEnum_Weibull2 ModelCategory = ModelCategoryEnum_Reliability ModelName = "MyNewModel" ModelParams(0) = 1 ModelParams(1) = 100 Call AModel.SetModel(ModelType, ModelCategory, ModelName, ModelParams) 'Connect to a Synthesis repository and project. Dim MyRepository As New Repository MyRepository.ConnectToRepository("C:\RSRepository1.rsr10") MyRepository.Project.SetCurrentProject(1) 'Send the model to the project. Call MyRepository.Model.AddModel(AModel) End Sub