Projects

The collection PslProjects contains all projects that are opened in Passolo. You access this collection with PassoloApp.Projects.

This example lists all open projects:

Sub Main 
 Dim i As Integer 
 For i = 1 To PSL.Projects.Count 
  Dim prj As PslProject 
  Set prj = PSL.Projects(i) 
  PSL.Output prj.Name 
 Next i
End Sub

Because PslProjects is a collection, this code can be easier written as:

Dim prj As PslProject 
For Each prj In PSL.Projects 
 PSL.Outputprj.Name 
Next prj

The current project, i.e. the project from the active window, can be accessed with PassoloApp.ActiveProject.

Opening existing projects

To open an existing project use the method PslProjects.Open:

PSL.Projects.Open("c:\MyProjects\MyProject.lpj")

Remember, that the unicode version of Passolo uses the extension .lpu.

Creating new projects

To create a new project, use the method PslProjects.Add. With PslSourceLists.Add and PslLanguages.Add you set your source files and target languages.

Dim prj As PslProject 
Set prj = PSL.Projects.Add("Test","c:\MyProjects") 
prj.SourceLists.Add("c:\MyApplication.exe")
prj.Languages.Add("deu")

A detailed example to create projects you find in Example 3.