Repository.Model.GetModel

Gets a cModel object that represents a given model resource in the current project. Returns nothing if the model does not exist or is not in the current project.

Syntax
.Model.GetModel(ID)

Parameters
ID
 * Required. Integer. The ID number of the model to retrieve.

Example
This example assumes that a model with ID #47 exists in the first project of a Synthesis repository.

VBA MyRepository Repository MyRepository.ConnectToAccessRepository AModel cModel MyRepository.Project.SetCurrentProject(1) AModel = MyRepository.Model.GetModel(47) ModelName String ModelID Integer ModelName = AModel.Name ModelID = AModel.ID  MsgBox ( & ModelName &  & ModelID)

VB.NET MyRepository Repository MyRepository.ConnectToAccessRepository AModel cModel MyRepository.Project.SetCurrentProject(1) AModel = MyRepository.Model.GetModel(47) ModelName String ModelID Integer ModelName = AModel.Name ModelID = AModel.ID  MsgBox ( & ModelName &  & ModelID)