Repository.Project.GetCurrentProject: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{Template:APIBreadcrumb|9|Repository}}
{{Template:APIBreadcrumb|10|Repository}}
{{Template:API}}
{{Template:API}}
Returns a '''[[NameIdPair Class|NameIDPair]]''' object that contains the name and ID number of the project you are currently connected to.
Returns a '''[[NameIdPair Class|NameIDPair]]''' object that contains the name and ID number of the project you are currently connected to.

Revision as of 19:59, 13 July 2015

Member of: SynthesisAPI10Repository

APIWiki.png


Returns a NameIDPair object that contains the name and ID number of the project you are currently connected to.

Syntax

object.Project.GetCurrentProject()

where object is a variable that represents a Repository object.

Example

VBA|VB.NET
Dim MyRepository As New Repository ...'Add code to connect to a Synthesis repository.
'Set the first available project in the repository as the current project. MyRepository.Project.SetCurrentProject(1)
'Output example: Get the name and ID of the current project and display it in a message box. 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)