Save a graph, workbook or matrix window as a template
template_saveas pg:=[Graph1] category:="My Templates" template:="OffsetY" filepath:="C:\My Templates" emf:=0 bmp:=1;
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
Page | pg |
Input Page |
|
Specify the page which will be saved as tempalte. The active page is used by default if no page is specified. |
Category | category |
Input string |
|
Specify the template's category name. |
Template Name | template |
Input string |
|
Specify the template name. Default is ORIGIN. |
File Type | ftype |
Input int |
|
Specify the file type. When save the Graph template, default file type is OTPU. When save the Workbook template, default file type is OTWU. When save the Matrix template, default file type is OTMU.
Option list:
|
Template Description | desc |
Input string |
|
This is used to add description about the template. |
Template Type | savetemplate |
Input string |
|
Specify template type. It is set automatically according to the specified page. Which are Workbook Template (*.otw), Graph Template (*.otp) and Matrix Template (*.otm) respectively. Note that it is invisible in GUI. |
Preset Graph Short Name | sname |
Input string |
|
Preset Short Name for graph created from this template. It is only available for graph window. |
Preset Graph Long Name | lname |
Input string |
|
Preset Long Name for graph created from this template. It is only available for graph window. |
Mark as Cloneable Template | clone |
Input TreeNode |
|
Specify whether the template is cloneable. It is only available for graph window. |
Match Modifiers by | matchModifiers |
Input string |
|
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. |
File Path | filepath |
Input string |
|
Specify the template file path. The default path is the User Files Folder. Note that the path should be exist, or the script gives an error. |
Preview Image (Optional) | preview |
Input string |
|
When you save a graph or workbook template, a preview image of the window is automatically generated. Graph previews are used in the Plot menu (Templates category) and Template Library. Workbook previews are used in the New Workbook dialog.
Option list: 0=...File:[*.bmp;*.jpg;*.png]*.bmp;*.jpg;*.png |
EMF File | emf |
Input int |
|
Specify whether or not to save an EMF image file for the template preview. This check box is available when saving a graph template. |
Bitmap | bmp |
Input int |
|
Specify whether or not to save a Bitmap image file for the template preview. This check box is available when saving a graph template. |
Allow System Theme & System Increment Lists to Override | loadsys |
Input int |
|
Specify whether or not to allow system theme upon loading to override the template settings. This check box is available when saving a graph window.
Option List:
|
Dialog Hint | asksave |
Input int |
|
Dialog hint, for display only. Give a notice that if the Allow System Theme to Override check box is checked, the template settings can be overridden by the system theme upon loading. This string is shown on the dialog when the Allow System Theme to Override is checked for the first time. |
This X-function is used to save a graph/workbook/matrix window to a template. There are different settings for saving these three windows to a template. And the dialog is different according to the specified page.
template_saveas -d;
in Command Window. In the pop-up dialog, specifies settings as below to save the template named OffsetY in My Template category.