Chapter 17: The CMAP Program

Go to the Next Chapter
Go to the Previous Chapter
Go to the Table of Contents for This Manual
Go to the Guides Master Index

Chapter 1 * Chapter 2 * Chapter 3 * Chapter 4 * Chapter 5 * Chapter 6 * Chapter 7 * Chapter 8 * Chapter 9 * Chapter 10 * Chapter 11 * Chapter 12 * Chapter 13 * Chapter 14 * Chapter 15 * Chapter 16 * Chapter 17 * Chapter 18 * Chapter 19


17.1 CMAP Overview

The ANSYS and DISPLAY programs keep track of colors by assigning them to index numbers. The correlation between index numbers and their assigned colors defines a color map. You can use the CMAP program to create a custom color map file. CMAP also supports redirection of standard input and output. To run this program, you must have a cursor device such as a mouse.

17.2 Starting CMAP as a Stand Alone Program

The CMAP program can be run separately from the ANSYS program. You can start the CMAP program from the XANSYS launcher (UNIX systems), from an icon (Windows systems), from UNIX command level, or from within the ANSYS program.

17.2.1 Starting the CMAP Program from the UNIX Launcher

You can enter the CMAP program from the ANSYS UNIX launcher. Here is the procedure to follow:

1. Select the CMAP Utility option from the XANSYS launcher. CMAP displays the following prompt:

Enter Display Device Name:
	Press RETURN if current value is correct
2. CMAP displays the following prompt:

Set Display Device Specifications
	(Press RETURN if the current value is correct.)
Enter Number of Bit Planes (Currently 8)
3. Enter the number of color planes. If you are using a 16-color device, enter 4 (i.e., 16 = 24). If you are using a 256-color device, use the default value of 8 (256 = 28). Press Enter if you do not need to make any changes. CMAP displays the following prompt:

Enter the number of contours (Maximum = 128) (currently 9):
*** NOTE - Contour colors can be independently changed ONLY on C-option
display devices.  This will be ignored on all other devices.
Note-You can change contour colors independently only if the graphics device name is set to X11C. This will be ignored on other devices.

4. Enter the number of contours or press Enter if you do not need to make any changes. CMAP displays the following prompt:

Enter Color Map File Name (Currently FILE.CMAP):
5. Enter the name of the color map file that you want to edit or create.
CMAP displays the status of your CMAP settings:

Display Device	= 	Current device driver name
Bit Planes	=	Number of color planes, i.e., 4 or 8
Contours	=	Number of contours, i.e., 9, 128, etc.
Color Map File	=	Specified filename and extension.
OK? Yes (Default) or No:
6. If the settings are acceptable, enter Yes. You can further customize the color map using the CMAP program's single control panel. See FIgure 17-2 for an illustration of the control panel.

17.2.2 Starting the CMAP Program on Windows Systems

To start CMAP from Windows, click on the Start button and choose Programs>ANSYS 5.5>CMAP Utility. The following window appears:

Figure 17-1 CMAP Utility Window on WIndows Systems

You may change the following options as indicated:

Display Device Name

Sets the device type. The options are WIN32 and WIN32C.

Number of contours

Sets the number of contours that can be independently changed. This is valid only on WIN32C devices.

Color Map File Name

Saves the current color file for later use.

17.2.3 Starting the CMAP Program from UNIX Command Level

You also can start the CMAP program by issuing the following command from UNIX command level:

cmap55
You can specify either or both of the following command options with the cmap5x command:

-j

Jobname

-d

Device_Type

These options have the same function as in the ANSYS program. However, CMAP does not support the following command line options: -m (memory), -db (database), -b (batch mode), -l (language), -p (product), -v (version), and -s (activate the START5x.ANS file).

A number of prompts appear. If you have any questions about how to respond to them, see Section 17.2.

17.3 Using CMAP From Within ANSYS

The CMAP program can be accessed from within ANSYS. The command /CMAP, Fname, Ext, Dir, Kywrd, NCNTR will either load an existing CMAP file (no value specified for Kywrd), or create a new CMAP file (Kywrd=CREATE). See the /CMAP command in the ANSYS Commands Reference for additional information. The CMAP program is also accessed via the following menu paths:
Utility Menu>PlotCtrls>Style>Colors>Load Color Map
Utility Menu>PlotCtrls>Style>Colors>Create Color Map.

17.4 Customizing the Color Map

Once you activate the CMAP program, the CMAP control panel appears:

Figure 17-2 CMAP control panel

The control panel will have a slightly different appearance on a C-option device (for instance, X11C):

Figure 17-3 CMAP control panel for C-option devices

This control panel is easy to use. Using mouse picks, simply select a current color, red-green-blue specifications, or any of the six function buttons. The functions are defined as follows:

To change the color specifications for an index, you must first select that index as the current color by picking the desired index bar from the vertical list of color bars. The picked index's color will appear in the "current color" box. Next, change the index's color specifications by picking the appropriate positions of the RED, GRN, and BLU selection bars in the bottom right corner of the screen. After each position is selected, the color of the "current color" bar and of the picked index bar will be updated to reflect the current specification.

The "/PNUM INDEX" shown on the CMAP control panel maps the correlation between entity numbers and colors. For example, in a display of areas, with area numbering ON, the color map shown in Figure 17-2 will cause area number 3 to be displayed with the color given by color index 12, area number 7 to be displayed with the color given by color index 11, and so on.

Once you have created a new color map file (using the WRITE button and have exited the CMAP program (using the QUIT button), you can then use the /CMAP command in either the ANSYS or DISPLAY program to read in your customized color map file.


Go to the beginning of this chapter