Home > PCB_Net > unhighlightNet
PCB_Net.unhighlightNet() 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.
Unhighlight the net
Signature
typescript
function unhighlightNet(net: string): Promise<boolean>;1
Parameters
Parameter | Type | Description |
|---|---|---|
net | string | Net name |
Returns
Promise<boolean>
Whether the operation is successful
Remarks
The return value of this API is result-oriented. If the net was not highlighted before, true will also be returned
Example
javascript
// 1. 创建带网络名的过孔,让 PCB 中出现可操作的网络
const via = await eda.pcb_PrimitiveVia.create('嘉立创示例_NET1', 2000, 2000, 20, 40);
// 2. 先高亮该网络
await eda.pcb_Net.highlightNet('嘉立创示例_NET1');
// 3. 取消该网络的高亮
const unhighlighted = await eda.pcb_Net.unhighlightNet('嘉立创示例_NET1');
// 4. 清理测试图元(操作类需要清理)
await eda.pcb_PrimitiveVia.delete([via.getState_PrimitiveId()]);
console.log('unhighlighted:', unhighlighted);1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13