Repository.Project.SetCurrentProject: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
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>


Connects to a project that you specify and sets it as the current (active) project. Returns a '''Boolean''' value; when true, indicates a successful connection to the project.
Connects to a project that you specify and sets it as the current (active) project. Returns a '''Boolean''' value; when true, indicates a successful connection to the project.
This is similar to opening the first project shown in the project list of a Synthesis application.
<noinclude>
<noinclude>
== Syntax ==
== Syntax ==
''object''.'''Project.SetCurrentProject(''ProjectID'')'''
'''.Project.SetCurrentProject'''(''ProjectID'')
 
where ''object'' is a variable that represents a Repository object.


=== Parameters ===
=== Parameters ===
{| {{APITable}}
''ProjectID''
|-
:Integer. The ID number of the project. (Required)
|ProjectID{{APIParam|Required}}||'''Integer'''. The ID number of the project.
|}




== Example ==
== Example ==


  '''VBA|VB.NET'''<br>
  '''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|...'Add code to connect to a Synthesis repository.}}
  {{APIComment|...}}
   
   
  {{APIComment|'Set the first project in the repository as the current project.}}
  {{APIComment|'Set the first available project in the repository as the current project.}}
{{APIComment|'This is similar to opening the first project shown in the project list of a Synthesis application.}}
   MyRepository.Project.SetCurrentProject(1)
   MyRepository.Project.SetCurrentProject(1)
</noinclude>
</noinclude>

Revision as of 17:48, 20 July 2015

APIWiki.png


Member of: SynthesisAPI10Repository


Connects to a project that you specify and sets it as the current (active) project. Returns a Boolean value; when true, indicates a successful connection to the project.

This is similar to opening the first project shown in the project list of a Synthesis application.

Syntax

.Project.SetCurrentProject(ProjectID)

Parameters

ProjectID

Integer. The ID number of the project. (Required)


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)