
Contents |
Save a graph/workbook/matrix window as template
template_saveas pg:=[Graph1] category:="My Templates" template:="OffsetY" filepath:="C:\My Templates" emf:=0 bmp:=1;
| 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. Default is UserDefined. |
| Template Name | template |
Input string | | Specify the template name. Default is ORIGIN. |
| 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. |
| 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. |
| 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 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. |
| Dialog Hint | asksave |
Input int | | Dialog hint, for display only. |
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, and create a bitmap for preview.