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 1: | Line 1: | ||
<noinclude>{{Template:API}}{{Template:APIBreadcrumb|10|[[Repository Class|Repository]]}}</noinclude> | <noinclude>{{Template:API}}{{Template:APIBreadcrumb|10|.[[Repository Class|Repository]]}}</noinclude> | ||
Gets a list of all existing projects in the current repository. Returns a '''[[NameIdPair Class|NameIDPair]]''' object array that contains the project names and ID numbers. | Gets a list of all existing projects in the current repository. Returns a '''[[NameIdPair Class|NameIDPair]]''' object array that contains the project names and ID numbers. | ||
<noinclude> | <noinclude> | ||
== Syntax == | == Syntax == | ||
' | '''.Project.GetAllProjects()''' | ||
== Example == | == Example == | ||
'''VBA|VB.NET''' | '''VBA|VB.NET''' | ||
{{APIComment|'Add code to connect to a Synthesis repository.}} | |||
{{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository | {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository | ||
{{APIComment|...}} | |||
{{APIComment|'Get a list of all projects in the repository.}} | |||
{{APIPrefix|Dim}} ListofProjects() {{APIPrefix|As}} NameIDPair | {{APIPrefix|Dim}} ListofProjects() {{APIPrefix|As}} NameIDPair | ||
ListOfProjects = MyRepository.Project.GetAllProjects() | ListOfProjects = MyRepository.Project.GetAllProjects() |
Revision as of 17:45, 20 July 2015
Member of: SynthesisAPI10.Repository
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
.Project.GetAllProjects()
Example
VBA|VB.NET 'Add code to connect to a Synthesis repository. Dim MyRepository As New Repository ... 'Get a list of all projects in the 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)