pcb_set_rules_enabled
Bulk-toggle DRC-enabled flags on PCB design rules by name, wildcard, or kind to silence noisy rule classes during focused reviews and re-enable them before a release sweep.
Instructions
Bulk-toggle the DRC-enabled flag on design rules by name.
Useful for focused review passes: disable a noisy class of rules
to surface the violations that matter (e.g. silence Silk-to-Silk
while you sweep Clearance), or re-enable a set before a release
sweep. Matches case-insensitively; supports trailing-* wildcards
so a rule family can be targeted without listing every name
("DiffPair_*" hits every rule whose name starts with that).
Note that this flips DRCEnabled (whether DRC actually checks the rule),
not Enabled (whether the rule exists in the rule list); the
former is the right knob for review iteration.
Args:
names: Rule names to toggle. With match="name" (default)
each entry is matched case-insensitively against
Rule.Name; a trailing * wildcards the suffix
("Clearance*"). With match="kind" each entry is
a TRuleKind ordinal as a string (look up via
pcb_get_design_rules).
enabled: New value for DRCEnabled. True turns the rule
ON in DRC; False disables it for this run.
match: "name" (default) or "kind".
Returns:
Dict with:
- matched: rules that matched any pattern
- updated: how many actually changed value
- enabled: the requested target value (for confirmation)
- items: per-matched {name, kind, prev_enabled, new_enabled}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| match | No | name | |
| names | Yes | ||
| enabled | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||