OriginLab Corporation - Data Analysis and Graphing Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis                     
 

3.2 Opening, Closing and Backing Up the Origin Project File

To open a project file

  • From the menu, choose File: Open.... Make sure the Files of Type is Origin Files (*.opju, *.opj, .og?, *.ot?). Select the project file and click Open. This will close everything in the current workspace and load the selected project file. If modifications to the current project have not been saved, Origin will prompt you to save your work.
  • From the menu, choose File: Append. You can select multiple project files. The selected project files will be added to the current workspace. You will be asked to (a) add them as subfolders in the current Project Explorer folder or (b) add them directly to the current folder. Note: Each child window name must be unique within a project, so child windows contained in appended OPJs may be renamed by enumerating.
  • Drag-and-drop a project file from Windows Explorer into the Origin workspace. If the workspace is the default Untitled workspace, this will be equivalent to File: Open. If there is a named project file open in the current workspace, the dropped project file will be appended to the existing workspace and you will be prompted to (a) create a new folder or (b) add to the current folder.
  • Double-clicking a project file in Windows File Explorer will launch a new instance of Origin with the project file loaded.

To save a project file

  • Choose File: Save Project or click Save Project Button Save Project.png on the Standard toolbar. This will save everything in the current Origin workspace to the file name shown in Origin workspace title bar. Note: The Project Explorer folder that is active when saving the OPJ file will be the folder that opens when re-opening the OPJ file.
  • Choose File: Save Project As... and specify a path, a File Name and Save as Type of *opju or *.opj.
  • Right-click a folder or subfolder in Project Explorer to save only that folder and its subfolders to a separate project file.

You can configure Origin to open a customized project file on startup. Select Tools: Options, click the Open/Close tab and set Start New Project to Origin.opj. Click "Yes" at the prompt. Then, save your customized project to the root of your User Files Folder using the name Origin.opj. Each time you run Origin, your customized project will be loaded automatically.

Origin 2018 includes new file formats for projects, child window files and templates. When you save a file, you will have the option of saving a file with or without a "u" appended to the file type (*.opj or *.opju):

  • If you intend to use the file only in the latest version of Origin, save to the new OPJU file type as it offers some performance advantages.
  • If you intend to share the project with colleagues using earlier versions of Origin, you should save the project as the older OPJ file type.
  • If you wish to have Origin default to saving the older OPJ (and/or OGG graph window file) file type, open the Script Window (Window: Script Window) and change the value of "@" System Variable @OPJ.

What is (and isn't ) saved with the Origin project file?

Saved
NOT Saved

Project Backup and Recovery

Origin has three different data recovery features which can be enabled or disabled from Tools: Options:

Project recovery tools options.png
  1. Backup is the oldest Origin recovery feature and can be useful for recovering data when you have a project file that will not open. This file should contain the project content at the moment of the last successful file save.
  2. Autosave is useful for recovering from program crashes and power failures. As the name implies, the file is automatically saved at some predefined interval.
  3. Unsaved is useful for recovering data that you declined to save on closing the file or the program (both Untitled and named files).

New Projects

By default when you launch Origin, the Origin window title shows UNTITLED-/Folder1 to indicate a blank new project and that your current Project Explorer folder is Folder1. This file remains named as UNTITLED until you choose File: Save Project or File: Save Project As. In either case, attempting to save UNTITLED will open the Save As dialog box where you can choose a path, a File name and a file type (Save as type).

Autosave Unsaved Project

If you make some modification to an open project - be it a named (saved) project or UNTITLED -- a star character ("*") will show next to the file name in the Origin title bar.

File modify indicator.png

Once a file has been modified, attempting to close the file or exit Origin before choosing File: Save Project or File: Save Project as, will trigger a prompt to save changes to the project.

Beginning with Origin 2018, if you say NO AND Autosave Unsaved Project is enabled (default), the project file will be saved automatically before closing:

Tools autosave unsaved.png
  • If the project was UNTITLED, modified contents are saved to C:\Users\User\Documents\OriginLab\Unsaved\UNTITLED.
  • If the project was named, modified contents are saved to C:\Users\User\Documents\OriginLab\Unsaved\projectName.

To recover the contents of an unsaved project:

  1. Run Origin.
  2. Click Help: Open Folder: Unsaved Projects.
  3. Browse the folder for your unsaved file.

The other way to locate folders associated with data recovery is to open Tools: Options and click on the System Path tab. Here, you will find paths for Autosave, Backup, and Unsaved files.

Recovery folders system path.png

Notes on /Unsaved Projects

  • The maximum size for unsaved files is controlled by LabTalk System Variable @USM. By default, @USM is set to 20MB; unsaved files larger than 20MB will not be autosaved. Rather than increase the maximum size of unsaved files, users are encouraged to save new project content to a named file, without delay.
  • There can be only one file named UNTITLED. If you want to save the contents of UNTITLED, you should open the file and save it with a meaningful name. While any subsequent changes to UNTITLED will be autosaved, UNTITLED will be overwritten if you start another unnamed project and fail to save on close or exit.
  • By default, Unsaved Files are kept for 7 days. The keeping time is controlled by LabTalk System Variable @USKT.

Autosave Project Every xx Minute(s)

Tools autosave every xxminutes.png

Origin has an Autosave project every xx minute(s) feature that is turned on by default. Once you've modified your project file, the autosave feature periodically saves project contents to a temporary file in the user's \Documents\OriginLab\Autosave folder. The file will be named with the name of your project file, with a "-number" appended to it.

If you experience a program crash or power failure, you should be able to recover most of your work by browsing to and opening this temporary file. If you save the Origin project and exit the program normally, Origin "cleans up" by deleting the temporary file.

In order for the autosave feature to work:

  • You must have saved the project once; that is, if you are starting with a new project, you must have given it a name.
  • Once you save a project, the project must be modified since your last Save/Save As/Open or no temporary file is created.


To open the autosaved file:

  1. Locate the Autosave folder by one of the following:
    • Select Help: Open Folder: Autosave menu to open the folder.
    • Open Tools: Options.... The System Path tab lists all paths created by Origin, including Autosave (Note that, on this tab, you can modify the location of your Autosave folder by highlighting Autosave and then clicking the Change... button).
  2. Open by (a) double-clicking on the project icon in Windows File Explorer, (b) use Origin's File: Open... menu command or (c) drag and drop the file onto your Origin workspace.

Controlling autosave settings

To enable or disable the autosave feature, or to adjust the period of time between autosaves:

  1. Choose Tools: Options menu to open Options dialog.
  2. Go to Open/Close tab and check or uncheck the Autosave project every x minute(s) checkbox and adjust the saving frequency as needed.

Notes on /Autosave Projects

  • There is a threshold project size (20MB by default and controlled by "@" System Variable @ASC), that will trigger the following attention dialog box when the project is saved or autosaved:
Autosave prompt.png

Since autosaving of files can slow your work, this dialog box serves to allow you to turn off autosave for the current project or for any project larger than the threshold size.
Do this only upon careful consideration.

  • Additionally, you will see that there are options to turn off this attention dialog ("don't ask again..."). To restore the attention dialog once it has been turned off, open the Script Window (Window: Script Window), type the following command and press <Enter>:
doc -ca

The next time you save a large OPJ file, this Attention dialog will open if the @ASC threshold project size has been exceeded (see the doc -ca command switch).

  • The time period that an Autosaved (crashed) project is kept is controlled by an "@" System Variable @ASKH. By default those "keeping hours" = 12, but you can change this value in the Script Window (Window: Script Window). If you do not want to automatically purge files from the /Autosave folder, set @ASKH = -1.

Backup Project Before Saving

Tools backup.png

When you manually save a named Origin project file, a copy of the file as it existed at the time of the last save, will be saved to the Project Backup folder. If, for some reason, your current file becomes corrupted, you should be able to roll back to the previous version of the file by opening the file at /Backup. This feature is enabled by default and is independent of the "Autosave" and "Unsaved" features.

Note: The \Backup folder was added in Origin 2018b.

In earlier versions, Origin will backup the previous version of current project file through saving a BACKUP.OPJ(U) file to your User Files Folder (UFF). There is only one BACKUP.OPJ(U) file so if you have later reopened another OPJ(U) file and manually saved the OPJ(U), the BACKUP.OPJ(U) will be for the new backup file.

To open the back up project file:

  1. Run Origin.
  2. Choose Help: Open Folder: Project Backup.
    or
    Open Tools: Options, copy the \Backup path from the System Path tab and paste that path to the address bar in Windows File Explorer.
  3. Find the project file and open it.

To disable the creation of BACKUP.opj file:

  1. Choose Tools: Options... menu to open the Options dialog.
  2. Go to Open/Close tab and uncheck the Backup Project Before Saving checkbox.

Notes on /Backup Projects

  • Beginning with 2018b, Origin allows saving of multiple backup files, one for each named project. Those files will accumulate over time and may consume considerable disk space. By default, Origin displays a periodic reminder message about accumulating backup files. Control of this message is via "@" System Variable @BFS.
Backup attention message.png
 

© OriginLab Corporation. All rights reserved.