Repository.Project.SetCurrentProject: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
{{Template:APIClass|Repository Class|Repository}}
{{Template:APIBreadcrumb|9|Repository}}
{{Template:Repository.SetCurrentProject.Cmt}}
{{Template:API}}
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.


== Syntax==
== Syntax ==
*SetCurrentProject({{APIPrefix|ByVal}} ProjectID {{APIPrefix|As Integer}}){{APIPrefix|As Boolean}}
''object''.'''Project.SetCurrentProject(''ProjectID'')'''


Parameters
where ''object'' is a variable that represents a Repository object.
:''ProjectID'': Set the current project to this ID.


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


== Usage Example ==
 
{{Template:RepositoryFull.Ex}}
== Example ==
 
'''VBA|VB.NET'''<br>
  {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository
{{APIComment|...'Add code to connect to a Synthesis repository.}} <br>
{{APIComment|'Set the first project in the repository as the current project. This is similar to opening the first project shown in the project list of a Synthesis application.}}
  MyRepository.Project.SetCurrentProject(1)

Revision as of 18:30, 13 July 2015

Member of: SynthesisAPI9Repository

APIWiki.png


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.

Syntax

object.Project.SetCurrentProject(ProjectID)

where object is a variable that represents a Repository object.

Parameters

Name Description
ProjectIDborder="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse; text-align: left; cellborder"
Name Status Integer. The ID number of the project.


Example

VBA|VB.NET
Dim MyRepository As New Repository ...'Add code to connect to a Synthesis repository.
'Set the first project in the repository as the current project. This is similar to opening the first project shown in the project list of a Synthesis application. MyRepository.Project.SetCurrentProject(1)