Repository.Project.GetCurrentProject

From ReliaWiki
Revision as of 17:30, 9 June 2016 by Kate Racaza (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
APIWiki.png


Member of: SynthesisAPI.Repository


Returns a NameIDPair object that represents the name and ID pair of the current project.

Syntax

.Project.GetCurrentProject


Example

VBA|VB.NET

 'Declare a new Repository object and connect to a Synthesis repository. 
  Dim MyRepository As New Repository
  MyRepository.ConnectToAccessRepository("C:\RSRepository1.rsr10")

 'Set the first available project in the repository as the current project. 
  MyRepository.Project.SetCurrentProject(1)

 'Output example: Display the name and ID of the current project. 
  Dim ProjectName As String
  Dim ProjectID As Integer
  ProjectName = MyRepository.Project.GetCurrentProject.Name
  ProjectID = MyRepository.Project.GetCurrentProject.ID
  MsgBox ("You are currently connected to: " & ProjectName & ", ID#" & ProjectID)