Import Utility
Template Import Utility
Overview
The template import utility imports custom templates into the Web SDK server. These templates will be presented to users when they choose to “Start with a Template” in the diagram editor.
Note that in most cases, using this utility is not necessary. The server can be configured to automatically
import custom templates from a directory using the options customTemplates
, customTemplatesDir
,
customTemplatesWatchDir
, customTemplatesLocales
. See the Server page for more information.
Usage
The template import utility is a command line script found here:
C:\< Path of the installed Web SDK>\server\template-import.cmd
Options
--help
A quick synopsis of the information covered in this document.
--dir-in
The paths to one or more directories containing the custom templates to be imported. The templates in multiple directories can be imported by separating their paths with spaces. All the templates processed in these directories will be assigned the locale defined by the option --locale
.
--locale
The locale of the templates to be processed. All the templates processed will be assigned this locale. The default is en-US.
--watch
When present, this option will cause the utility to watch for template file updates. I.E, when template files in the template directories are added, updated, renamed, or deleted, the templates delivered to users by the server will be updated.
Examples:
-
.\template-import.cmd --dir-in "D:\custom templates"
This command will import the templates in the specified directory and assign them to the default locale, en-US.
-
.\template-import.cmd --dir-in "D:\custom templates" --locale ar-EG
This command will import the templates in the specified directory and assign them to the locale ar-EG.
-
.\template-import.cmd --dir-in D:\Templates D:\Templates2
This command will import the templates in two directories.
-
.\template-import.cmd --dir-in "\\server\Share Custom Templates" --watch
This command will import the templates in the specified directory and then watch that directory for template file updates.