Home > DMT_Pcb > getAllPcbsInfo
DMT_Pcb.getAllPcbsInfo() method
Get all in the project PCB detailed properties of
Signature
typescript
function getAllPcbsInfo(): Promise<Array<IDMT_PcbItem>>;1
Returns
Promise<Array<IDMT_PcbItem>>
Array of detailed properties of all PCBs
Example
javascript
// 1. 创建一个测试 PCB 并等 1.5s 同步,保证列表里有新近创建的对象
const pcbUuid = await eda.dmt_Pcb.createPcb();
await new Promise(r => setTimeout(r, 1500));
// 2. 获取所有 PCB 的详细属性
const pcbs = await eda.dmt_Pcb.getAllPcbsInfo();
// 3. 输出每块 PCB 的名称与 UUID,确认测试 PCB 在列
pcbs.forEach((p, i) => {
console.log(`pcb[${i}]:`, p.name, p.uuid);
});
console.log('total:', pcbs.length);
console.log('test pcb included:', pcbs.some(p => p.uuid === pcbUuid));
// 4. 清理测试 PCB(查询类案例不留测试对象)
await eda.dmt_Pcb.deletePcb(pcbUuid);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