Repository.Project.GetAllProjects: Difference between revisions
Jump to navigation
Jump to search
Kate Racaza (talk | contribs) No edit summary |
Kate Racaza (talk | contribs) No edit summary |
||
Line 18: | Line 18: | ||
ListOfProjects = MyRepository.Project.GetAllProjects() | ListOfProjects = MyRepository.Project.GetAllProjects() | ||
{{APIComment|'Output sample: Display the name and ID of the first available project in the repository.}} | |||
{{APIPrefix|Dim}} ProjectName {{APIPrefix|As}} String | {{APIPrefix|Dim}} ProjectName {{APIPrefix|As}} String | ||
{{APIPrefix|Dim}} ProjectID {{APIPrefix|As}} Integer | {{APIPrefix|Dim}} ProjectID {{APIPrefix|As}} Integer |
Revision as of 16:31, 14 July 2015
Member of: SynthesisAPI10Repository
Gets a list of all existing projects in the current repository. Returns a NameIDPair object array that contains the project names and ID numbers.
Syntax
object.Project.GetAllProjects()
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. Dim ListofProjects() As NameIDPair ListOfProjects = MyRepository.Project.GetAllProjects() 'Output sample: Display the name and ID of the first available project in the repository. Dim ProjectName As String Dim ProjectID As Integer ProjectName = ListofProjects(0).Name ProjectID = ListofProjects(0).ID MsgBox ("The first project is: " & ProjectName & ", ID#" & ProjectID)