Repository.Project.SetCurrentProject: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{Template:APIClass|Repository Class|Repository}}
{{Template:APIClass|Repository Class|Repository}}
Sets the current project to the specified Project ID. Returns the Boolean status.
{{Template:Repository.SetCurrentProject.Cmt}} Returns True if successful, otherwise returns False.


== Method Syntax==
== Syntax==
{{APIName|'''SetCurrentProject'''(}}
*SetCurrentProject( ProjectID {{APIPrefix|As Integer}}){{APIPrefix|As Boolean}}
{{APIPrefix|ByVal}}
{{APIName|ProjectID}}
{{APIPrefix|As Integer}}
{{APIName|)}}
{{APIPrefix|As Boolean}}<br>
{{APIComment|Opens (sets as current) a project with the specified ID. If 0 is passed, a first available project will be set as current.}}


== Parameters ==
Parameters
'''ProjectID'''
:''ProjectID'': Set the current project to this ID.
Set the current project to this ID.


== Usage Example ==
== Usage Example ==

Revision as of 17:23, 27 February 2014


Opens (sets as current) a project with the specified ID. Returns True if successful, otherwise returns False.

Syntax

  • SetCurrentProject( ProjectID As Integer)As Boolean

Parameters

ProjectID: Set the current project to this ID.

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")

Set the current project to the desired ID.

       Dim IDChangeSuccess As Boolean = False
       If MyRepository.SetCurrentProject(1) Then
          IDChangeSuccess = True
       End If