Repository.Project.GetCurrentProject: Difference between revisions
Jump to navigation
Jump to search
Kate Racaza (talk | contribs) No edit summary |
Kate Racaza (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
{{Template:API}}{{Template:APIBreadcrumb|10|.[[Repository Class|Repository]]}} | |||
Returns a '''[[NameIdPair Class|NameIDPair]]''' object that contains the name and ID number of the project you are currently connected to. | <onlyinclude>Returns a '''[[NameIdPair Class|NameIDPair]]''' object that contains the name and ID number of the project you are currently connected to.</onlyinclude> | ||
< | |||
== Syntax == | == Syntax == | ||
'''.Project.GetCurrentProject()''' | '''.Project.GetCurrentProject()''' | ||
Line 25: | Line 25: | ||
ProjectID = MyRepository.Project.GetCurrentProject().ID | ProjectID = MyRepository.Project.GetCurrentProject().ID | ||
MsgBox ({{APIString|"You are currently connected to: "}} & ProjectName & {{APIString|", ID#"}} & ProjectID) | MsgBox ({{APIString|"You are currently connected to: "}} & ProjectName & {{APIString|", ID#"}} & ProjectID) | ||
Revision as of 22:06, 20 July 2015
Member of: SynthesisAPI10.Repository
Returns a NameIDPair object that contains the name and ID number of the project you are currently connected to.
Syntax
.Project.GetCurrentProject()
Example
VBA|VB.NET 'Add code to connect to a Synthesis repository. Dim MyRepository As New Repository ... '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)