Repository.Project.GetCurrentProject

Syntax

 * GetCurrentProjectNameIdPair

Usage Example
In this usage example, the API is used to connect to a repository, retrieve one of the models in it and then calculate the reliability at a specified time, based on that model. Dim MyRepository As New Repository Dim Success As Boolean = False Success = MyRepository.ConnectToRepository("C:\Users\Name\Documents\ReliaSoft\Files\repository.rsr9") Dim ListOfProjects As NameIdPair ListOfProjects = MyRepository.GetAllProjects MyRepository.SetCurrentProject(ListOfProjects(0).ID) Dim ListOfModels As NameIdPair ListOfModels = MyRepository.GetAllModelsInfo Dim AModel as cModel AModel = MyRepository.GetModel(ListOfModels(0).ID) Dim Rel as Double Rel = AModel.Reliability(50) MyRepository.DisconnectFromRepository