Overview
The DRC Rule Editor lets you write custom rules for your board, such as a wider clearance around high-voltage nets or a minimum width for power tracks. Open it in the board editor with Tools > DRC Rule Editor. The menu shows in the Full layout; on a Mac the menu bar is always there.
Start from a saved board and your manufacturer's real limits. Keep a copy of your custom rules before you apply a manufacturer preset or import a rules file, since both replace them.
Constraint Types
Pick the constraint that matches the physical requirement.
Clearance
Spacing between copper objects. Copper, hole, edge and courtyard clearances are separate rules; set the one you mean.
Track Width
The allowed width range, with an optional target. Width alone does not set current capacity or impedance; work those out first.
Via Style
Drill, pad diameter and annular ring for each via type. Blind, buried and micro vias also need a matching stackup and your manufacturer's agreement.
Matched Length
Length and skew limits for a group of nets. A rule does not route or tune anything by itself; use matched length groups and the tuning tools for that.
Text Height & Thickness
Minimum text height and stroke on the layers you choose, such as silkscreen. Check your manufacturer's printing limits.
Courtyard Clearance
Spacing between part courtyards. It does not check enclosure fit, tool access or heat; Trace Mechanical checks the case.
Custom Expressions
Write conditions with the editor's completions for object properties and functions, for example to apply a rule only to one net class. Check which objects a condition matches, and the order of your rules, since a later rule can take over from an earlier one.
Rule Management
Naming and Validation
Give each rule a clear name. The editor warns about duplicate names and syntax errors, but a rule that is valid can still match the wrong objects.
Dynamic Unit Labels
Read the unit shown beside each value before you type. 1 mil is 0.0254 mm, so 6 mil is 0.1524 mm.
Keyboard Shortcuts
Save with the editor's save action, then check that the rules saved.
Scrolling
Read the whole rule set, including later rules, before deciding which one applies.
Workflow
- Open the board and check the active rules preset in the DRC window.
- Add or edit a rule from your design and manufacturer requirements.
- Check values, units, conditions and order.
- Save, and fix any errors the editor reports.
- Run Inspect > Design Rules Checker > Run DRC, with Refill all zones before performing DRC ticked.
- Click each finding, fix the design or the rule, and run DRC again.
The board's rules, net classes and custom rules decide what DRC checks. Notes for the assistant in TraceRules guide its work but do not change DRC.
Your Rules Stay Put
From Trace 3.2, your design rules and Board Setup settings, such as clearances, track and via sizes and rule severities, keep their values after the assistant edits the board, a teammate's changes merge in, or you switch branches.
If the Rules Do Not Apply
Look for a syntax error, a condition that matches nothing, a rule order problem, or a different preset selected in the DRC window. A rules file that fails to load does not mean a clean board. Fix the file or go back to your saved copy, then run DRC again.
If Trace says the manufacturer rule presets are not installed, reinstall or update Trace; your existing rules are kept meanwhile. From Trace 3.3 the presets come with Trace on Windows too.
To pick a manufacturer preset or import a rules file, see DRC Import. For the final checks before you order, see Design Review.