Home > PCB_Drc > deleteDifferentialPair
PCB_Drc.deleteDifferentialPair() 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 the differential pair
Signature
typescript
function deleteDifferentialPair(differentialPairName: string): Promise<boolean>;1
Parameters
Parameter | Type | Description |
|---|---|---|
differentialPairName | string | Differential pair name |
Returns
Promise<boolean>
Whether the operation is successful
Example
javascript
// 1. 生成本次运行专用的网络名和差分对名(网络不能属于其他差分对)
const ts = Date.now();
const netP = `JLC_DEMO_DP_P_${ts}`;
const netN = `JLC_DEMO_DP_N_${ts}`;
// 2. 放带差分网络的焊盘并创建差分对
const x = 3000 + Math.floor(Math.random() * 20000);
await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], netP, null, 0, 0, 0, false, 0);
await eda.pcb_PrimitivePad.create(1, '2', x + 500, 3000, 0, ['ELLIPSE', 60, 60], netN, null, 0, 0, 0, false, 0);
const pairName = `嘉立创示例_待删差分对_${ts}`;
await eda.pcb_Drc.createDifferentialPair(pairName, netP, netN);
// 3. 删除该差分对
const result = await eda.pcb_Drc.deleteDifferentialPair(pairName);
console.log('result:', result);1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16