Repository.Model.GetModel

Gets the model with the designated ID number and returns it as a cModel object. Returns nothing if the model does not exist or is not in the current project.

Syntax
.Model.GetModel(ID)

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

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

VBA MyRepository Repository 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 AModel cModel MyRepository.Project.SetCurrentProject(1) AModel = MyRepository.Model.GetModel(47) ModelName String ModelID Integer ModelName = AModel.Name ModelID = AModel.ID MsgBox ( & ModelName &  & ModelID)