Repository.Project.SetCurrentProject: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>{{Template:API}}{{Template:APIBreadcrumb|10|[[Repository Class|Repository]]}}</noinclude>
{{Template:API}}{{Template:APIBreadcrumb|.[[Repository Class|Repository]]}}




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.
<onlyinclude>Sets the current (active) project for the repository. Returns a '''Boolean''' value; when true, indicates a successful connection to that project.</onlyinclude>


This is similar to opening the first project shown in the project list of a Synthesis application.
<noinclude>
== Syntax ==
== Syntax ==
  '''.Project.SetCurrentProject'''(''ProjectID'')
  '''.Project.SetCurrentProject'''(''ProjectID'')
Line 11: Line 9:
=== Parameters ===
=== Parameters ===
''ProjectID''
''ProjectID''
:Integer. The ID number of the project. (Required)
:Required. Integer. The ID number of the project.




Line 18: Line 16:
  '''VBA|VB.NET'''
  '''VBA|VB.NET'''
   
   
  {{APIComment|'Add code to connect to a Synthesis repository.}}
  {{APIComment|'Declare a new Repository object and connect to a Synthesis repository.}}
   {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository
   {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository
  {{APIComment|...}}
  MyRepository.ConnectToAccessRepository({{APIString|"C:\RSRepository1.rsr10"}})
 
  {{APIComment|'Set the first available project in the repository as the current project.}}
  {{APIComment|'Set the first available project in the repository as the current project.}}
   MyRepository.Project.SetCurrentProject(1)
   MyRepository.Project.SetCurrentProject(1)
</noinclude>

Latest revision as of 15:29, 9 June 2016

APIWiki.png


Member of: SynthesisAPI.Repository


Sets the current (active) project for the repository. Returns a Boolean value; when true, indicates a successful connection to that project.

Syntax

.Project.SetCurrentProject(ProjectID)

Parameters

ProjectID

Required. Integer. The ID number of the project.


Example

VBA|VB.NET

 'Declare a new Repository object and connect to a Synthesis repository. 
  Dim MyRepository As New Repository
  MyRepository.ConnectToAccessRepository("C:\RSRepository1.rsr10")
 
 'Set the first available project in the repository as the current project. 
  MyRepository.Project.SetCurrentProject(1)