Fundamentals > Working with the Model > Layers > Layer Items > To Add Items to Layers Using Rules
  
To Add Items to Layers Using Rules
You can also add items to layers by using the Rules to create rules that define the items of a layer. The layer can either store only the items gathered by the rule, or it can store the items and the rule itself. If the rule is stored, then the layer will update its items with new items that meet the rule criteria.
1. Open the Layer Properties dialog box of a new or existing layer by right-clicking any item within the Layer Tree.
2. Click the Rules tab. The layers are dependent and non-associative by default. If the layer is independent and the Rules Enabled check box is selected, then the layer is updated each time an item matches the criteria and is added to the model.
3. Click Options to define the rule settings by selecting one of the following:
Associative—Adds all the existing and newly created items to the Query Builder box that currently meet the rule criteria.
Rules Enabled—Controls whether items matching the rules can be automatically added to the layer. The newly created items are added either to the default layers or to the user-defined layers based on the rule criteria they meet.
Independent—The layer becomes independent and rules are created using Edit Rules.
4. Select Edit Rules. The Rule Editor dialog box opens.
5. Use the Rule Editor dialog box to create the rules for gathering items. For example, type Name is equal to A* to gather all component names starting with the letter A.
6. Click OK in the Search Tool dialog box.
7. Create a rule in the Rules area of the Layer Properties dialog box.
8. Select Contents to see items added to the layer. The icon in the Status column of the Model Tree indicates how the item was included in the layer (by rule or manually). The Contents page is updated only when you close the Layer Properties dialog box.
 
To define a rule the layer must be independent.
You can add one item to multiple layers by adding the item to one layer first using its Layer Properties dialog box. After one layer contains the item, you can select the item in the Layer Tree and right-click Copy Item on the shortcut menu. Select all the other layers to copy to this item and use Paste Item on the shortcut menu to copy the item to all the selected layers.