Create a Rule
- Last UpdatedMar 27, 2024
- 5 minute read
-
To create a new rule, right-click on the Schematic Attribute Rules node, or the node of rule group or a rule, and select either Create > Rule or Insert > Rule from the menu that is then displayed.
-
If the Create option is selected, the new rule is created within the currently selected node, beneath any rules and groups already in that node.
-
If the Insert option is selected, the new rule is created above the currently selected node, or at the top of the list of rules and group if the Schematic Attribute Rules node was selected.
The new rule is created and given the default new rule name (New Rule):

-
-
Select the new rule. Details of the new rule are displayed in the right-hand pane:

-
Enter the name of the new rule in the Name field. This is optional, as a name derived from the properties of the rule will be assigned to the rule when it is created. The name entered here will suffix this identifier (see below for further information).
-
If the new rule is to be processed, select "True" from the Enabled field. Otherwise select "False". The state of the checkbox against the rule in the left-hand pane will change to reflect the setting made here, and vice versa.
-
The number of attribute filters set up for the rule displayed in the Attribute filters field. To add an attribute filter, click on the ... option at the end of the Attribute filters field. The Attribute Filters dialog is then displayed.

-
Enter a valid attribute in the displayed Attribute field, or select a attribute from the drop down.

-
In the Operator field, select the required operator from the drop-down list.

-
The "In the List" operator enables you to specify a list of values (separated by spaces) for the specified attribute value. These can be numeric or non-numeric, depending on the type of the attribute. For example, Attribute=AREA, Operator="In the List", Value="0 1 3", would find items which have AREA attribute equal to either 0 or 1 or 3.
-
In the Value field enter an appropriate value.
-
Multiple attribute filters can be applied. To do so, click on the Add Filter option. A new row of fields in which filter details can be entered is then displayed.
-
To delete a filter or filters, select the row or rows they are displayed in and click on the Delete Filter option.
-
Once the required filters have been set up, click OK to close the dialog. To close the dialog without saving any changes, select the Cancel option.
-
-
Select the attribute to which the rule is be applied from the Attribute field. The list consists of the attributes shared by the selected Element Types, that means, only attributes which are common to all the selected Element Types are listed.
If the selected element types are changed, the list of valid attributes may also change. If an attribute was selected that is now invalid, another attribute must be selected.
-
If a rule is a Name Clash Rule, select "True" in the NameClashRule field. Otherwise leave this set to "False".
The name attribute value of an element must be unique in the database. Due to the application of a rule, the name of an element may be set to a value that is already in use. This is called a "name clash".
Name Clash Rules are set up to prevent this. If a name clash is detected during an import, the process will search for the Name Clash Rule of the element's element type (if one exists), and apply that instead.
It is recommended that for each rule which attempts to set the Name attribute of one or more elements, there should be a corresponding Name Clash Rule, which Schematic Model Manager can apply to the Name attribute value of the same elements in the event of a name clash.
-
If the application of a Name Clash Rule still results in a clash, or if there is no Name Clash Rule found for the element type(s), a default name is applied instead.
-
The value applied to the selected attribute is determined by a DB expression. To enter this expression, select the ... option at the end of the DB Expression field. The Edit DB Expression dialog is then displayed.

Enter the required DB Expression.
For information on DB Expressions, refer to Expressions in the Database Management Reference Manual.
Select the OK option. The entered expression is then displayed in the DB Expression field.
If the expression is valid, a green tick will be displayed to the left of this field. If the expression is invalid, or if no expression has been entered, a red cross is displayed. Invalid expressions are displayed in red text.
Note:
If the DB Expression field is left blank, or an invalid DB Expression is provided, the rule will be shown in red in the Attribute Derivation Rules explorer, and the rule will not be active. -
To select an element type or types to which the rule is to be applied, select the ... option at the end of the Element Types field. The Select Values dialog is then displayed.

-
The Select Values dialog consists of two lists. The Available Values list lists the Element Types which are available for selection. The Selected Values list lists the Element Types that have been selected.
To select an Element Type, select it in the Available Values list and click the > option to transfer it to the Selected Values list.
To de-select an Element Type, select it in the Selected Values list and click the < option to transfer it back to the Available Values list.
Use the >> option to move all Element Types to the Selected Values list. Use the << option to move all Element Types to the Available Values list.
Elements may also be selected/deselected by double clicking.
Click the OK option once the required Element Types have been selected. The selected Element Types are then displayed in the Element Types field of the Rule Attribute dialog.
Click Cancel to close the dialog without saving any selections that have been made.