[Next] [Previous] [Up] [Top] [Contents] [Index] |
Chapter 3 Working With Templates And Color Rules
A template could be any file that you use to create new displays. For example, you may want to create a number of display files that have the same default channel, that reference the same external color palette, that use the same default background and foreground colors, and that have the same size window. It would be much easier to simply create a display file that has all these attributes, and then each time you want to create a display, copy the display to a new file (see the section on the copy display option in the previous chapter). A template file could even have more precise uses. For instance, it could be precisely the same display, but the dynamic objects within it would use macros in place of channel names. A macro can be expanded to an actual channel name at run time; thus, you can use the same display to connect to different channels. When you run DM, you simply add an argument to the start up command that tells DM to replace the macro with the channel's name. See the next chapter, Chapter 4, Creating and Manipulating Objects, for more information on specifying channel names and macros, and see Chapter 9, DM: Run-time Operation, for information on expanding macros at run time.
Templates have three purposes:
1.1. Creating a New Display from a TemplateA template file is any file that you use to create new files, in order to save time when configuring displays or to create a standard for displays in a system or subsystem. A template file could be an actual display file that is used at run-time and that is configured for a very specific purpose, but which you modify to serve another purpose. Or a template file could be a display list file that you never use at run-time, but that has some general configuration properties and attributes set so that you can create any number of displays using this template. Naturally, you will have to modify any template display file to some degree, but the amount of modifying required depends on how specific or general the information in the template file is.
To create a new display from a template:
Figure 3-1 shows an example of a file that is used as a template for displays that monitor analog outputs during run time. Notice the macro
For more information on how to configure templates, you'll have to refer to the other parts of this manual. For more information on configuring global display attributes, see Chapter 2, Basic Operations. For more information on configuring particular objects, see the remaining chapters 4,5,6,7 and 8, and for information on configuring color rules, see the section Color Rules in this chapter.
A color template file must consist of, at the very least, a color map and any color rules you wish to use (see the section Color Rules in this chapter for more about color rules). It is impossible for a group of displays to share colors but not color rules.
It is helpful but not requisite for a color template file to actually have objects within the drawing area. These objects are merely static as they will never be used in DM, but they can give anyone referencing the file a good idea of the color standard for which the color template file was meant. Figure 3-2 is an excellent example of a color template file. Note the objects in the drawing area: this color template, more than having a color map for other displays to share, is an actual guide that will help anyone to configure related displays according to its standard.
To reference a color template file as an external color palette:
One important thing to note about color template files: when you try to edit the color rules or color map of a display that shares a color template file, a dialog box will appear. Essentially, it says that the current file uses another display for its colors or color rules, and if you wish you can receive a "local copy" of these colors. If you left-click copy in the choice button at the bottom of the dialog box, EDD will copy the color map and the color rules of the color template file to the display file you are editing, and the display will no longer share the color map or color rules with the color template file. Left-click cancel if you do not wish to do this.
EDD/DM User's Manual, 2.4 - 27 MARCH 1997 [Next] [Previous] [Up] [Top] [Contents] [Index]
L O S A L A M O S N A T I O N A L
L A B O R A T O R Y