By Charlie Frye, Esri Chief Cartographer
![]()
A question was posed on Ask a Cartographer about using representation rules that you have saved in a style in another map on a different layer. The online help for this topic didn’t provide much assistance. The topic on organizing representation rules in a style explained how to load the rules in to a new layer, but it didn’t explain how to make use of them, i.e., how to make the features with the newly loaded rule.
This blog entry explains what you need to know to take advantage of representation rules you’ve saved in your styles:
About representations and your layer’s data
First, a little background. When you add a representation rule to your data, it is assigned to a representation class (your data can have many representation classes, each used to symbolize your data for a different purpose). However, just because you add a representation rule to one of your data’s representation classes doesn’t mean any features are using it.
When you create a new representation class or convert your layer’s regular symbology to representations, a coded value domain is created – the description is the rule name. Also, two fields are added to your data — one for the rule ID and the other for an override. That rule ID field uses the geodatabase domain, and that is what assigns the rule to each feature. When you convert symbology to representations, each symbol you had assigned to your layer adds an entry to this domain. But, if you create a new representation class in ArcCatalog, no features yet have a rule ID assigned. You need to assign the rule IDs to the features by typing in each value or using the field calculator to calculate multiple values.
Assigning a newly added representation rule to your features
Try this experiment to better understand how this work. First, create representations for one of your layers, and take note of or even customize the field names. Next, follow these steps:
- Open the attribute table for that layer.
- Scroll horizontally if needed until you can see the new Rule ID field for your representation class.
- Start Editing.
- Click on one of the cells in the Rule ID field. A drop-down combo box will show you the rules you have to choose from, including the new rule you added.*
- Notice no features currently use that new rule.
* The geodatabase domain that assigns the representation rule is a special case of a coded value domain. That means, for efficiency’s sake, only the ID, or number that represents the rule is stored in the data. Initially, this list starts with 1, and follows in order with the list of symbols. When you add another rule, it gets the next number. This important to know because when you use the field calculator, you will need to know the integer ID of a rule in order to calculate it to a selection of features.
Before you assign a rule to the features, you need to learn which IDs go with which rules. Here are the steps:
- Use ArcCatalog to view your feature class properties.
- On the Subtypes tab, click the Domains button.
- In the list of domains, find the domain name that matches your representation class’s name, and select it.
- In the coded values section, you will see the list of codes (Rule IDs) and descriptions (the rule names – these appear on the symbology tab when you use this representation class).
Tips:
- Do not edit, in any way a representation class’s domain–the internal geodatabase data model maintains this domain, and changes will break your representation class.
- We have found it very useful to copy the list of codes into a text file so it is handy when editing features or assigning different representation rules (from a style or new rules) to existing data.
- Adding a representation rule from a style will result in the name you gave the rule in the style being replaced by a generic rule name.
Now you can add a new rule or a load one of these saved rule.
To sum up, storing your representation rules in a style isolates them from your data. Thus, once you assign a representation rule from a style, you will need to edit or your data in order to assign that rule to be used by any of your features.