Repository.Model.GetModel

Returns a cModel object, which represents a model resource. 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)