Home > PCB_Net > unselectNet
PCB_Net.unselectNet() method
此 API 当前处于 BETA 预览状态,希望得到开发者的反馈。它的任何功能都可能在接下来的开发进程中被修改,请不要将它用于任何正式环境。
取消选中网络
签名
typescript
function unselectNet(net: string): Promise<boolean>;1
参数名
参数 | 类型 | 描述 |
|---|---|---|
net | string | 网络名称 |
返回值
Promise<boolean>
操作是否成功
示例
javascript
// 1. 创建带网络名的过孔,让 PCB 中出现可操作的网络
const via = await eda.pcb_PrimitiveVia.create('嘉立创示例_NET1', 2000, 2000, 20, 40);
// 2. 先选中该网络
await eda.pcb_Net.selectNet('嘉立创示例_NET1');
// 3. 取消该网络的选中
const unselected = await eda.pcb_Net.unselectNet('嘉立创示例_NET1');
// 4. 清理测试图元(操作类需要清理)
await eda.pcb_PrimitiveVia.delete([via.getState_PrimitiveId()]);
console.log('unselected:', unselected);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