Home > PCB_Drc > deleteRuleConfiguration
PCB_Drc.deleteRuleConfiguration() 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.
Delete Design rule configuration
Signature
typescript
function deleteRuleConfiguration(configurationName: string): Promise<boolean>;1
Parameters
Parameter | Type | Description |
|---|---|---|
configurationName | string | Configuration name |
Returns
Promise<boolean>
Delete Whether Successful
Remarks
The system configuration does not allow deletion
Example
javascript
// 1. 读取当前配置并保存为待删除的自定义配置
const current = await eda.pcb_Drc.getCurrentRuleConfiguration();
await eda.pcb_Drc.saveRuleConfiguration(current.config, '嘉立创示例_待删配置', true);
// 2. 删除该自定义配置
const result = await eda.pcb_Drc.deleteRuleConfiguration('嘉立创示例_待删配置');
console.log('result:', result);1
2
3
4
5
6
7
8
2
3
4
5
6
7
8