Creating a layer symbology file
Creating a layer symbology file
In ModelBuilder, datasets and layer variables have a Layer Symbology property that can contain the name of a layer file (.lyr) that defines the symbology used to draw the data when it is added to the display. This layer file is called a Layer Symbology file.
- Start ArcMap and edit your model in ModelBuilder.
- Run your model in ModelBuilder.
- Add the desired variable to the display by right-clicking the variable and clicking Add To Display. This creates a new layer in the ArcMap table of contents.
- In ArcMap, double-click the new layer to open its properties, then click the Symbology tab. Change the symbology to how you want the model output to be displayed.
- Click OK.
- Right-click the layer and click Save As Layer File. (Alternatively, you could run the Save To Layer File tool.)
If you are using a classification (such as unique values) to symbolize your data, you can choose to have the output data reclassified, causing the legend to change depending on your output.
Setting layer symbology using unique value category
When you are symbolizing data in categories, the state of the <all other values> check box, illustrated in the table below, determines how the data will be symbolized.
Checked—The data will be symbolized as specified. The legend is unchanged. No new categories are created. This is referred to as static symbology. |
|
Unchecked—The data will be read, and new categories will be created based on the data. The legend will change. This is referred to as dynamic symbology. |
Following are details about how data in categories is drawn when using a layer symbology file or the Apply Layer From Symbology tool.
If your symbology layer file defines unique categories like the above illustration, there are rules that determine how the output is drawn.
- The output data must have the unique value field (CODE in the above illustration). If this field is missing, the output data is drawn with default symbology. (You can map a field on the dataset to the symbology field using Make Feature Layer tool.)
- If the unique value field exists on the output data, its values are read from the output data to create a list of unique values. You can think of this list as containing two types of values:
- Matched values are those that are found in the symbology definition.
- Unmatched values are those that are not found in the symbology definition.
- If <all other values> is checked, unmatched values are drawn with the symbol defined for <all other values> and the legend is not updated, as illustrated above. This is referred to as static draw because the legend is not updated.
- If <all other values> is unchecked, values are symbolized using the following rules:
- If the Value Field is an integer or text field
- Matched values will use the symbol as defined in the classification (the existing symbol).
- Unmatched values will use a color from the color ramp and the symbol defined by <all other values> such as a thick or thin line. The legend is updated to contain all matched and unmatched values.
- If the unique value field is a long or double field
- Both matched and unmatched values will use a color from the color ramp and the symbol defined by <all other values>. The legend is updated to contain all matched and unmatched values.
- If the Value Field is an integer or text field
- The limit for the number of unique values is 500.
Setting layer symbology using quantities
You can also symbolize output data by quantities. The screen shot below shows the properties of a graduated color quantity. The value field is Score, and the number of classes is five.
Learn more about classifying data using graduated colors
If your symbology layer file defines quantities like the above illustration, there are a few rules that apply.
-
The output data must have the value field (Score in the above illustration). If this field is missing, the output data is drawn with default symbology. (You can map a field on the dataset to the symbology field using Make Feature Layer tool.) (Proofreader note: Same question as above.)
-
If the value field exists on the output data, the values will be read and classified into the number of classes specified (5 in the above illustration). The classes will be drawn using the specified color ramp.
You can force the same classification to be used regardless of the values found on the output data:
- Select Graduated colors and a field value and click Classify.
- From the classification method, choose Manual.
-
Enter the break values to set the classification.