English

How To: Create a shadeset using item values

Procedure

How can I create a shadeset using values in a feature attribute table or INFO file?

Answer:

You can easily create a shadeset using an AML. Cursor processing can simplify access to an attribute table or INFO file. A shade color definition needs to use a separate item for each color component, so if the values you intend to use are in one item, you need to redefine it into separate items. The following AML uses the CMY color model with the SHADECOLOR command; you can modify it to use the color model (CMYK, RGB, HSV or HLS) of your choice.

ARCPLOT
SHADEDELETE ALL
CURSOR < cursor > DECLARE < cover > < feature_class >
/* You can also use: CURSOR < cursor > DECLARE < info_file > INFO
CURSOR < cursor > OPEN
&DO n = 1 &TO %:< cursor >.AML$NSEL%
SHADECOLOR CMY %:< cursor >.< cyan_item >% %< cursor >.<
magenta_item >% ~
%< cursor >.< yellow_item >%
SHADEPUT %n%
CURSOR < cursor > NEXT
&END
SHADESAVE < name >.SHD

Notes:

For details on cursor processing, please refer to the online documentation: Managing Tabular Data > Cursor processing > The CURSOR.

For details on color models, please refer to the online documentation: Map dispay and query using ARCPLOT > Specifying symbols > Specifying color.