Window Templates

This section should only be read by database administrators who are setting up window configurations for their users.

Window templates are files that contain window setup information captured by the window_template_export script.

Window templates are used automatically by NewViews whenever needed. There is no corresponding window template import script.

The window template folder.

Window template files are kept in the window templates folder: c:/nv/nv2.dat/window_templates where c:/nv is assumed to be the NewViews installation folder. Window template files have the extension .nv2_window_template. They have special file names and whenever NewViews creates a new window, NewViews searches the window templates folder for the template corresponding to the class of the window being configured. If NewViews cannot find a template for a window class, then a basic default configuration is used.

Creating and using your own templates.

When you run the window_template_export script, NewViews will export a set of window template files. You can export them to any folder and also copy them around later. Two reasonable destination folders are the window template folder .../nv2.dat/window_templates described above, and a folder with the same name, i.e. window_templates in the same folder containing the workstation database. When looking for a window template, NewViews checks the window_templates folder in the current workstation folder before checking the default window template folder, i.e. c:/nv/nv2.dat/window_templates. So you can override the templates independently for different workstations.

Distributing Templates

You might also use a separate folder in order to distribute your setups to other users in a multi-user environment. Suppose you set up windows in such a way that they are especially convenient for a number of your users. You export the window templates to a folder on the network that all users can access. A user can then copy the templates into their window templates folder, i.e. to c:/nv/nv2.dat/window_templates, or into their workstation folders, and from that moment on their newly created windows will be configured in the same way.

Forcing the use of the templates.

We indicated that newly created windows will use the window templates but you can also force their use by issuing the Tools>Default Setup command. This re-creates the window and its sub-windows, and the window templates are during the re-creation.

How to export window templates.

  1. Set up windows the way you want them.
  2. You set up preferred window positions, sizes and columns, etc. The state of your windows will be captured in the exported templates, and used automatically whenever windows are created. This ability can be used to ease configuration and provide consistency among users.

  3. Issue the File>SaveAll command.

    To ensure that the exported information accurately reflects what you just set up, save the workstation data.

  4. Issue the Tools>Script Evaluate command and select the script.

    The scripts is c:/nv/nv2.dat/script/window_template_export.qw_script. It should appear by default in the list when you click <List> but if you don't see it, click <Browse> to pick it from a file explorer.

  5. Select the target folder.

    When exporting a window template you pick a folder and number of pre-named files are created in that folder.

    A good export folder is window_templates in the same folder that contains the workstation. By default, NewViews looks for window templates in the window_templates sub-folder of the workstation folder first; then in c:/nv/nv2.dat/workstation_templates.

Templates are text files.

An exported template file is a flat text file that can be viewed but it is not recommended that you edit it. The window template files are given the file extension .nv2_window_template.

Preparing for an export.

The real work behind the export scripts is preparation. To prepare, you navigate through your application database setting up windows the way you want them. When you are satisfied perform the export. Here are some techniques, pointers, and guidelines.


Copyright (c) 2003-2025 Q.W.Page Associates Inc., All Rights Reserved.