Repository.Project.GetAllProjects: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{Template:APIBreadcrumb|10|Repository}}
<noinclude>{{Template:API}}{{Template:APIBreadcrumb|10|Repository}}</noinclude>
{{Template:API}}
 
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>
== Syntax ==
== Syntax ==
''object''.'''Project.GetAllProjects()'''
''object''.'''Project.GetAllProjects()'''


where ''object'' is a variable that represents a Repository object.
where ''object'' is a variable that represents a Repository object.


== Example ==
== Example ==
Line 24: Line 23:
   ProjectID = ListofProjects(0).ID
   ProjectID = ListofProjects(0).ID
   MsgBox ({{APIString|"The first project is: "}} & ProjectName & {{APIString|", ID#"}} & ProjectID)
   MsgBox ({{APIString|"The first project is: "}} & ProjectName & {{APIString|", ID#"}} & ProjectID)
</noinclude>

Revision as of 23:18, 16 July 2015

APIWiki.png


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)