openprojectdialog()

Function that shows the user a dialog to choose a project to open. The user must select an .xpj file to open the project. The difference between this function and the function openproject() is that this function will prompt the user for a project.

Note: Always use this function or the function openproject() 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 openprojectdialog() is located in the file project.jsxinc.

Usage

To open a project and check that the user didn't click Cancel or something like that:

if(openprojectdialog())
  //Do something for the project.
else
  alert('You must open a project to run this script");

Parameters

Parameter Data type Required Description
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.