Parent page: Defining, Scoping & Managing PCB Design Rules
The Constraints Editor is a document-based user interface that offers an alternative approach for viewing, creating, and managing the design constraint rules used for your PCB layouts. The editor is arranged into six selectable rule sections of increasing priority – Nets , Diff Pairs , xSignals , Polygons , Components, and Advanced . In this arrangement, the first five sections (Nets to Components ) represent a design object view of the rules, while the Advanced view section applies to more complex rules (typically using queries) that cannot be expressed as the simpler design object-orientated rules.
The Constraints Editor – an alternative approach for managing design rules.
The Constraints Editor is accessed by clicking the Switch to Document View button in the PCB Rules and Constraints Editor dialog.
Switching to the Constraint Editor view from the PCB Rules and Constraints Editor dialog.
Click the Switch to Dialog View button in the editor's Properties panel to return to the PCB Rules and Constraints Editor dialog.
Switching back to the PCB Rules and Constraint Editor dialog from the Constraint Editor view.
Some of the advantages of using the editor are:
Using a document-based presentation interface rather than a dialog means that the PCB Editor and its associated functions remain active and accessible.
A shift from query-based rule scoping to an applied object type matching simplifies constraint rule creation.
Rule priority is automatic based on the natural hierarchy of design objects.
Interactive rule validation checking for detecting common syntax, assignment and scoping errors.
Constraint Rule Types
In the Constraints Editor, existing rules that feature more complex query expressions in their matching scope are considered Advanced Rules (or Custom Rules) while simpler rules are re-expressed as the object-type Basic Rules , i.e. rules based on the type of design objects being checked.
Most rules in the Advanced (query-based) format can be converted to the simpler Basic rules by dragging and dropping the rule onto the Basic Rules listing or by selecting the Move Custom Rule to Basic option from the Advanced rule's right-click menu. When converted, the advanced rule's query-based scope will be interpreted to the basic rule's object type qualification.
Query-based Advanced rules can be converted to simpler Basic rules.
Rule Prioritization
In general, the priority of Rules is dealt with automatically by the system. This is indicated by the arrangement of the rules view buttons in the interface, which are positioned by rule priority from left to right – Nets having the lowest priority.
Advanced (or Custom Created) rules take precedence over the sequence of Basic object rules and can be manually reordered within the Advanced view by dragging their entries up or down.
Conversely, Basic rules are automatically prioritized by the system based on the design object type as indicated by the object sections (Nets to Components ) in the document interface.
Within each of the (Basic) object rule sections, the priority is ordered from All (lowest) to Object Class to Object (highest), and by inference, rules with an All scope that have been converted to Basic rules will have the lowest priority.
To set an explicit priority for a Basic rule, right-click on the rule, select the Move Basic Rule to Advanced option, then manually set its priority position in the Advanced view. This applies to rules other than those with an All scope, for example, in the Nets view, a rule with a Net Class or Net scope specified can be converted (moved) to an Advanced rule.
New Custom Constraint Rule
Creating a new rule in the editor's default Advanced mode (as indicated and selected using the button) is similar to constructing a rule in the PCB Rules and Constraints Editor dialog. Select Add Custom Rule from the right-click context menu (or the button), add a query-based matching scope if required ( ) then enter the constraint parameters in the column grid or the lower graphical representation.
Create your own custom constraint rule
To simplify the repeated process of creating advanced/custom type rules, the Constraints Editor allows you to store query-based object matching scopes in the Scopes Library dialog (access using the menu). The library is presented in the Properties panel where custom scopes can be imported, managed and exported for reuse in other custom constraint rules. The use of a library-based scope in a rule is indicated by an icon in the rule's Object Match column entry.
Use the scopes library to simplify creating of custom rules.
Once a library-based scope has been applied to a rule, you can use the Object Match (scope) field's menu to remove the scope entry (Clear Scope ) or revert the scope back to its query-based format (Detach Scope ).
Also note that the Scopes Library itself can be exported as a custom scope XML file, which can then be used to populate the Scopes Library of another Altium NEXUS installation.
Drag and drop a rule to a different position in the listing to change its priority. Custom Rules adopt the highest priority. Note that the priority order of Basic (object) rule entries is automatically determined by their inherent hierarchy.
Select File » Save to PCB to save the constraints document file to the PCB project.
Design Object Constraint Modes
To take a simpler design-object orientation approach to constraint rule creation, select a suitable object mode button at the top of the rules grid to change from the default Advanced mode. Conceptually, these modes present a more integrated rule interface that focuses on constraining (limiting) how design objects can be applied rather than the creation of breakable design rules. The positional sequence of the design object buttons relates to increasing object complexity (and rule priority), from basic Nets (and classes) to unified Components up to the Advanced mode.
When in Advanced mode ( ), the rules are grouped by type, such as the basic Via
and Width
constraint rules shown in the below images. Further rule specificity can be created by adding a further rule and/or including a query language element.
In Advanced mode of the Constraint Editor, rules are grouped by type.
Conversely, the object-orientated views (Nets to Components ) organize the rules by design objects (e.g., Nets ) or classes (e.g., Net Class ) and as a result, provide a direct overview of how the rules apply to the design. To see an overview of rules that apply to an object type, select an object or class in the left column to see all associated rules, or select All to see all rules associated with the object type. The below example shows the overview of rules associated with Nets ( ).
In the object-oriented views of the Constraint Editor, rules are grouped by design objects.
When using the design object orientated approach, for example, with the Nets object type selected as shown below, the basic Via and Width rules are integrated into one composite entry. The grid layout also offers provision for more constraints to be added by (Net) object and class.
An object-oriented view displays constraints of the selected object type.
Adding further, more specific constraints in this example requires only that a Net or Net Class is selected and suitable values entered in the grid cells that correspond to the desired type of constraint rule. As shown below, a larger Via size has been permitted for Power
nets (defined by its class), and an increased maximum track width is assigned to the 5V
supply rail net. In effect, four rules are encompassed in one simple grid view, i.e. a width constraint for the 5V net, a width constraint for all other nets, a Via size constraint for the Power nets, and a Via size constraint for all other net classes.
Add more specific constraints for different objects and their groups (for example, nets and net classes).
Use the button to add a variation of the currently selected constraint rule, such as in the example shown below, where an additional 5V
net rule sets a preferred width for the Bottom
layer.
Variations of a selected constraint can be added.
Note that the availability of rule types within the grid entries is set by the available columns, which is, in turn, specified by those enabled in the Properties panel Rule Visibility listing. For example, enabling the Clearance entry in the Rule Visibility list will add the Clearance column to the Nets object type, as shown below. Adding an applicable clearance rule then involves just entering a net or class scope and suitable distance parameters.
Select the rules to be displayed in an object-oriented view.
Rule Validation
The validity of all active rules can be checked in the Rules/Constraints Checks region of the Properties panel by clicking the button. This action detects rules for likely errors such as duplicated rules, rules of the same scope with different values, rules with overlapping class members (such as nets), and rules with unresolved scopes. Each violation type entry can be expanded to show its violating rule(s), which when selected, will open the specific rule entry.
Check the validity of rules currently defined in the Constraints Editor.
Rule Violations
Enabled design constraint rules are applied to the current board design through a range of mechanisms, such as live Online Design Rule Checking , the batch Design Rule Checker or selectively run from the PCB Rules And Violations panel . Violations of those constraint Rules – where the specified and scoped limits are exceeded – are indicated through board graphics, panel entries and reports, as well as alert icons in the Constraints Editor. Additionally, as a bonus, violations can be inspected, analyzed and corrected while the Constraints Editor is open thanks to its design document (rather than dialog) format.
The Constraints Editor provides feedback on the rules under violation.
Properties Panel
When the Constraint Editor is currently active, the Properties panel presents the Document Options mode (or the Advanced constraints options mode in the editor's Advanced mode).
The following collapsible sections contain information about the options and controls available:
Actions
Switch to Dialog View – after launching the command, the view mode will change from Document View to Dialog View , which opens the PCB Rules and Constraints Editor dialog.
General
Show Default Values (in the Document Options mode only) – when enabled, applicable default values will be shown for all entries in the editor's grid area as faint text.
Units – use to select the measurement unit as desired.
Cross Probe View Settings
Select – when enabled, the filtered objects will be selected in the design space.
Zoom – when enabled (default), the filtered objects will be zoomed and centered (where possible) in the design space. Use the Zoom Level button to adjust the zoom factor that will be used to zoom in on filtered objects.
Normal /Mask /Dim drop-down – provides options for visibly contrasting filtered and unfiltered objects within the design space.
Normal – filtered objects are visible in the design space and the appearance of unfiltered objects remains unchanged.
Mask – filtered objects are highlighted in the design space with all other objects made monochrome.
Dim – filtered objects are highlighted in the design space with all other objects retaining their colors but shaded.
Rule Visibility
This region of the Properties panel is available only in its Document Options mode.
Grid – use to configure the availability of rule types within the editor's grid region.
Scopes Library
This region of the Properties panel is available only in its Advanced constraints options mode.
Scope – lists all the scopes that have been defined.
Query – displays the queries defined for the associated scope.
Import – use to import the selected scope to the Constraints Editor. This option is only available and accessible if a scope is selected in the dialog that is not already in the Constraints Editor.
Export – use to export the selected scope to the Constraints Editor.
Edit Library – use to open the Scopes Library dialog, where you may store query-based object matching scopes. custom scopes can be imported, managed and exported for reuse in other custom constraint rules.
Rules/Constraints Checks
Checking Rule Application
The Constraints Editor includes a cross-probe feature that will show a constraint rule's object scope by visually highlighting the net and connections in the corresponding PCB layout. To cross probe to any rule in the editor's grid listing, right-click on its entry then choose the Cross Probe option from the context menu or select Cross Probe from an advanced rule's menu.
Set the Cross Probe View Settings (the Zoom and Select options) in the Properties panel and use the PCB editor Clear Filter option to reset cross probe highlighting.
Cross-probe to the object under the scope of a rule from the Constraint Editor.