Mobile Data StudioObject Model › ProjectCollection

The ProjectCollection class contains references to all Project objects that are currently open in the Application.

This collection can be obtained via the Application.Projects property.

Enumerable

This class can be enumerated with a For Each loop.

Each enumerated item is a Project.

Indexable

This class can be indexed, with either an Integer or a String index:

  • An Integer index must be between 1 and the Count property.
  • A String index is the filename of the project to retrieve, including directory.

Returns the matching Project, or nothing if no such project is open.

Properties

Application

Returns the root Application.

Count

Returns the number of open projects as an Integer.

Methods

Create

Creates a new, empty project.

Takes one parameter:

  • fileName - a String that is the filename of the new project, including directory.

Returns a Project object, or fails with an error.

Open

Opens an existing project, unless it is already open in which case the open project is simply returned.

Takes one parameter:

  • fileName - a String that is the filename of the existing project, including directory.

Returns a Project object, or fails with an error.

GetProjectByFileName

Returns a project that is already open, searching by filename with or without the directory component.

Takes one parameter:

  • fileName - a String that is the filename of a project that is already open, with or without the directory component.

Returns a Project object, or fails with an error if none match.

GetProjectByUnique

Returns a project that is already open, searching by its Project.Unique property.

Takes one parameter:

  • unique - an Integer that is the unique ID number of a project that is already open.

Returns a Project object, or fails with an error if none match.

ImportFromXML

Creates a new project by importing an XML project description, in .ppcx format.

Takes one parameter:

  • fileName - a String that is the filename of a .ppcx XML project file to import.

The new project will be saved as a .ppc file with the same name and directory.

Returns a Project object, or fails with an error.