2.3 Origin Template Files (OTW, OTP, OTM)
Origin template files are used to store a custom suite of data handling and format options. Templates can be saved from Origin workbook, graph or matrix book windows. Data are not saved with a template file.
Origin's predefined templates
Origin ships with a number of predefined templates. During installation, these system templates are installed to the Origin program folder. You can use and freely customize the workbook, graph and matrix templates that ship with Origin but you cannot overwrite the templates in your program folder.
- If you customize a system template and you want to save those customizations for later use, save the template to your User Files Folder (UFF), or other convenient location. See Saving a customized window as a template.
- Saving the customized system template to your UFF has the advantage of (a) keeping your customized templates in a single, easily-remembered and easily-transferred location and (b) it allows you to make your custom template the default template associated with Plot menu commands and toolbar buttons. See Modifying the default template.
- If you need to restore the system default template for a particular menu command or toolbar button, see this section.
- If you want to open a system template but not disturb the current default template associated with a particular menu command or toolbar button, use the System Templates or Load Template dialog boxes.
|Note: There are three system templates that are special: ORIGIN.OTW (workbook), ORIGIN.OTP (graph), and ORIGIN.OTM (matrix book). These are the templates called when you click the New Workbook , New Graph or New Matrix buttons on the Standard toolbar.
Saving a customized window as a template
You can open the template_saveas dialog to save a customized window as a template.
To open the dialog to save a graph/workbook/matrixbook template:
- With the child window active, from the main menu, select File: Save Template As...
- Right-click on the window's title bar and select Save Template As... from the shortcut menu.
||Choose or type a custom category name, to be used in the Template Library. The default is UserDefined.
||Specify the template name. The default is the name of the template used to create the window. You can save to the same name or you can provide a new name. See this section for guidance.
||Origin 2018 introduced new Unicode-compliant file types for the various project, window and template files. These file types end in "U" (e.g. *.OPJU). Unicode files can only be read in Origin 2018 or later, so if you are concerned about backward compatibility, use the File Type drop-down to save to the older, 3-letter file type (no "U" on the end).
||Add a description that helps to identify the template.
|Preset Graph Short Name
||This option is only available for graph window. Preset Short Name for graph created from this template.
|Preset Graph Long Name
||This option is only available for graph window. Preset Long Name for graph created from this template.
|Mark as Cloneable Template
||This option is only available for graph window. If it's checked, when plotting new graph with such template, Origin will ignore the data selection in worksheet, it will check if the new data matches the original data by the Clone by Matching condition below. If matching, graph will be created purely by cloning the graph with new data. Cloneable Template can be quickly called by selecting Plot: User Templates menu. If this isn't checked, it will be a regular graph template. Graph will be created based on data selection. To learn more about clone plotting, please refer to Batch Plotting.
|Match Column by
||This option is available only when Mark as Cloneable Template is checked. Determines how new columns of data will be identified when using your cloneable template. Columns will be identified by:
- Index (location in the worksheet)
- Long Name
- Short Name
- The matrix window equivalent of the worksheet column is the matrix object. Like worksheet columns, Matrix objects have Long Names, Short Names and an index number. For more information, see Matrix Sheet Dimensions and XY Coordinates, Labels and Origin matrix object naming conventions.
- Attempting to save a template with Match Column by = Long Name when the column Long Name is missing or duplicated in the sheet or matrix object, produces the warning message "Empty/duplicate column long name exists in the source." Change option to proceed with saving template.
|Match Modifier(s) by
|| Some plot attributes can be modified by mapping them to a column of values. The mapped column can be identified by its relative column index number (Offset) or by column Short Name, Long Name, Units, Comments, (built-in) Parameter(n) or User-defined Parameter.
When duplicating a graph with new sheets or books, this setting controls modifier column selection, not the Match Plot Columns by setting in the Select Worksheet dialog.
This same Match Modifiers by control exists on the Miscellaneous tab of Plot Details.
||Specify the template file path. The default path is the User Files Folder (UFF).
|Save image for preview(EMF first)
||This branch is available when saving a graph template. Specify whether to save an image file for the current graph template that serves as a preview in the Template Library.
Two image types are optional under this branch:
|Allow System Theme to Override
||This check box is available when saving a graph window. Specify whether or not to allow system theme upon loading to override the template settings.
Modifying the default template
- System templates are templates that ship with Origin and which are installed to the Origin program folder. They cannot be overwritten.
- In a fresh Origin installation, system templates will be the default templates.
- Default templates are those that are associated with various menu commands and toolbar buttons. Default templates may be a system template or they may be a customized version of a system template that was saved to the User Files Folder (UFF).
- Origin's default templates are associated with the File: New: Window menu commands, the New Window buttons on the Standard toolbar and the various graph types listed in the Plot menu (workbook or matrix is active) and the buttons on the 2D Graphs and 3D and Contour Graphs toolbars.
Saving a customized window as the default template
- Click on the window that you want to save as your default template.
- Choose File: Save Template As... from main menu or right-click on the window title bar to select Save Template as... from the short-cut menu. This opens the template_saveas dialog.
- In the template_saveas dialog, two details are most important: Template Name and File Path.
- The Template Name will show the name of the template that was used to create the window. In the example below, the template name is Scatter and if saved to this name, this template will become the new default Scatter template associated with the Plot: Symbol: Scatter menu command and the Scatter graph button on the 2D Graphs toolbar.
- The File Path should be set to your \User Files folder.
To set any customized template as the default template for a particular menu item or toolbar button, customize a built-in (System) template and save it -- be it a workbook, matrix book or graph template -- to a file of the same name in your User Files Folder.
Setting an existing template file as your default template
- From the Origin menu, choose File: New: From Template: More... to open the Load Template dialog.
- Choose Type and Path to locate the template file.
- Select the desired template in the template list table and click on the Set Default button to set this template as default.
- Click OK to close the dialog.
Restoring the system template as the default
- To restore a system template as your default template, follow the instructions in the previous section while setting Path to Origin Program Folder.
- Remove the customized default template from \User Files. This forces Origin to look to your program folder for a system template of the same name.
- For graph windows, you can highlight the template in the Template Library and click the delete button in the upper-right corner of template preview