Home > PCB_Net > unhighlightAllNets
PCB_Net.unhighlightAllNets() 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 all nets
Signature
typescript
function unhighlightAllNets(): Promise<boolean>;1
Returns
Promise<boolean>
Whether the operation is successful
Example
javascript
// 1. 创建带网络名的过孔并高亮,让画布存在高亮网络
const via = await eda.pcb_PrimitiveVia.create('嘉立创示例_NET1', 2000, 2000, 20, 40);
await eda.pcb_Net.highlightNet('嘉立创示例_NET1');
// 2. 取消所有网络的高亮
const cleared = await eda.pcb_Net.unhighlightAllNets();
// 3. 清理测试图元(操作类需要清理)
await eda.pcb_PrimitiveVia.delete([via.getState_PrimitiveId()]);
console.log('allHighlightsCleared:', cleared);1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11