Get Template
Use this command to publish and unpublish templates without manual user intervention for each template.
You can use the Get Template commands (Get Template and Get TemplateInfo) in conjunction with the PublishTemplate command to migrate templates from one environment to another.
Publishing or unpublishing allocation patterns must be defined to all user groups.
Syntax
GET TEMPLATE Group|All TemplateType|All FileName|All [TargetFolder] [@GroupFile] [@CategoryFile]
where:
- Group is the user group name or All for all user groups.
- TemplateType can be one of the following:
Value Description LINK
To retrieve links.
REPORT
To retrieve report templates.
ALL
To retrieve all template types.
- FileName is the file name of the template (including the file extension) or All files.
- TargetFolder is the folder in which the template or templates will be stored. The TargetFolder may include a path; if no path is specified, the current default working folder is used. If there are spaces in the file name or file path, enclose the path or file name in double quotation marks. You cannot specify a TargetFolder and a GroupFile with different paths, or a GroupFile without a TargetFolder.
Caution: Ensure that your TargetFolder is not the existing templates folder on the server. This folder is reserved for Longview internal use. Using this folder may result in undesired behavior.
- GroupFile is the file name for the ASCII file containing template user group assignments. If you don’t specify a name for the group file, the default is template.idx. The group file has the following syntax:
Group{TemplateType{FileName
- CategoryFile is the file name for the ASCII file containing template category assignments. If you don’t specify a name for the category file, the default is template.cat. The category file has the following syntax:
FileName{Category
If no TargetFolder, GroupFile, or CategoryFile is specified, all templates will be saved in the working folder as well as the GroupFile (default name template.idx) and CategoryFile (default name template.cat).
Syntax example
GET TEMPLATE All Report All "C:\Program files\Longview\Servers\Reports" @ template.idx @categories.cat
Caution: Always use GET TEMPLATE ALL PATTERN ALL and GET TEMPLATE ALL LINK ALL when syncing templates to ensure all patterns and links are migrated properly.
See also