Repository.Project.SetCurrentProject: Difference between revisions
Jump to navigation
Jump to search
Chris Kahn (talk | contribs) No edit summary |
Chris Kahn (talk | contribs) |
||
Line 9: | Line 9: | ||
== Usage Example == | == Usage Example == | ||
{{APIComment|Declare a new repository connection class.}} | {{APIComment|'Declare a new repository connection class.}} | ||
Dim MyRepository As New Repository | |||
{{APIComment|Connect to the Synthesis repository.}} | {{APIComment|'Connect to the Synthesis repository.}} | ||
Dim Success As Boolean = False | |||
Success = MyRepository.ConnectToRepository("RepositoryFileNamePath") | |||
{{APIComment|Set the current project to the desired ID.}} | {{APIComment|'Set the current project to the desired ID.}} | ||
Dim IDChangeSuccess As Boolean = False | |||
If MyRepository.SetCurrentProject(1) Then | |||
IDChangeSuccess = True | |||
End If |
Revision as of 21:35, 23 May 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. Dim 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