Repository.Model.GetModel: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
{{Template:APIClass|Repository Class|Repository}}
{{Template:APIClass|Repository Class|Repository}}
Gets a Model from the connected repository.


== Property Syntax==
== Property Syntax==


{{Template:GetModel}}
{{Template:Repository.GetModel}}
 
== Usage Example ==
{{APIComment|Declare a new repository connection class.}}
        Private WithEvents MyRepository As New Repository
 
{{APIComment|Connect to the Synthesis repository.}}
        Dim Success As Boolean = False
        Success = MyRepository.ConnectToRepository("RepositoryFileNamePath")
 
{{APIComment|Get the list of Projects in the connected repository.}}
        Dim ListOfModels() As [[NameIdPair Class|NameIdPair]]
        ListOfModels = MyRepository.GetAllModelsInfo()
 
{{APIComment|Select the ID of the model and retrieve it.}}
        Dim AModel as cModel
        AModel = MyRepository.GetModel(ListOfModels(0).ID)

Revision as of 17:05, 18 September 2013


Gets a Model from the connected repository.

Property Syntax

Template:Repository.GetModel

Usage Example

Declare a new repository connection class.

       Private WithEvents MyRepository As New Repository

Connect to the Synthesis repository.

       Dim Success As Boolean = False
       Success = MyRepository.ConnectToRepository("RepositoryFileNamePath")

Get the list of Projects in the connected repository.

       Dim ListOfModels() As NameIdPair
       ListOfModels = MyRepository.GetAllModelsInfo()

Select the ID of the model and retrieve it.

       Dim AModel as cModel
       AModel = MyRepository.GetModel(ListOfModels(0).ID)