openproject()

Function that will open the project specified by the XPJ path. The function will then load the current project into the global variable currentProject.

Note: Always use this function or the function openprojectdialog() to open a project. This ensures that the global variable currentProject is set. If this variable is not set, several functions in the library may stop working.

The function openproject() is located in the file project.jsxinc.

Usage

var xpjpath = "C:/My project/My project.xpj";
openproject(xpjpath);

Parameters

Parameter Data type Required Description
xpjpath String The full path to the project XPJ.
updateifrequired Boolean   If set to true, the project will be updated if the project is from a previous version. Default is false.

Return values

Value Meaning
true Project was opened and the global variable was loaded.
false Project could not be opened.