User Guide
244 Chapter 14 Scripting the Visual Tools Object Model
Project Object
The Project object provides a basic set of propeties and methods for scripting
project maintenance tasks.
The ProjectManager and DeploymentManager objects extend the capabilities of the
Project object. For more information, see “ProjectManager Object” on page 246 and
“DeploymentManager Object” on page 252.
Properties
ActiveProjectFile
Syntax ActiveProjectFile (read-only)
Description Filename of the active project or empty string if no project is open.
Methods
AddFileToProject
Syntax AddFileToProject(const wsFilename: WideString): WordBool;
Description Boolean. Adds the passed file to the active project. The main project folder or a
subfolder of the main project must contain the file.
CloseProject
Syntax CloseProject(wbCloseOpenFiles: WordBool): WordBool;
Description Boolean. Closes the active project, if any. If wbCloseOpenFiles is True, then all open
files are closed.
OpenProject
Syntax OpenProject(const wsProjectFile: WideString): WordBool;
Description Boolean. Opens the passed project file, making it the active project. Pass an empty
string to display the Open Project dialog box.
RemoveFileFromProject
Syntax RemoveFileFromProject(const wsFilename: WideString): WordBool;
Description Boolean. Removes the passed file from the active project.