Home > PCB_Drc > getAllRuleConfigurations
PCB_Drc.getAllRuleConfigurations() method
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Get all Design rule configuration
Signature
typescript
function getAllRuleConfigurations(includeSystem?: boolean): Promise<Array<Record<string, any>>>;1
Parameters
Parameter | Type | Description |
|---|---|---|
includeSystem | boolean | (Optional) Whether Get System design rule configuration |
Returns
Promise<Array<Record<string, any>>>
All design rule configurations
Example
javascript
// 1. 查询全部设计规则配置(含系统配置)
const all = await eda.pcb_Drc.getAllRuleConfigurations(true);
// 2. 输出配置数量和名称
console.log('count:', all.length);
all.forEach((c, i) => {
console.log(`[${i}] name:`, c.name);
});1
2
3
4
5
6
7
8
2
3
4
5
6
7
8