Home > PCB_Drc > removeNetFromEqualLengthNetGroup
PCB_Drc.removeNetFromEqualLengthNetGroup() 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.
Remove a net from an equal-length net group
Signature
typescript
function removeNetFromEqualLengthNetGroup(
equalLengthNetGroupName: string,
net: string | Array<string>,
): Promise<boolean>;1
2
3
4
2
3
4
Parameters
Parameter | Type | Description |
|---|---|---|
equalLengthNetGroupName | string | Equal-length net group name |
net | string | Array<string> | Net name |
Returns
Promise<boolean>
Whether the operation is successful
Example
javascript
// 1. 准备两个真实网络(放带网络的测试焊盘)
const x = 3000 + Math.floor(Math.random() * 20000);
await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], 'JLC_DEMO_D0', null, 0, 0, 0, false, 0);
await eda.pcb_PrimitivePad.create(1, '2', x + 500, 3000, 0, ['ELLIPSE', 60, 60], 'JLC_DEMO_D1', null, 0, 0, 0, false, 0);
// 2. 建等长组并纳入网络
await eda.pcb_Drc.createEqualLengthNetGroup('嘉立创示例_等长网络组', ['JLC_DEMO_D0', 'JLC_DEMO_D1'], { r: 0, g: 255, b: 0, alpha: 1 });
// 3. 先单个移除,再批量移除
const removedOne = await eda.pcb_Drc.removeNetFromEqualLengthNetGroup('嘉立创示例_等长网络组', 'JLC_DEMO_D0');
const removedBatch = await eda.pcb_Drc.removeNetFromEqualLengthNetGroup('嘉立创示例_等长网络组', ['JLC_DEMO_D1']);
console.log('removedOne:', removedOne);
console.log('removedBatch:', removedBatch);1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14