Home > PCB_PrimitivePoured > getAll
PCB_PrimitivePoured.getAll() 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.
Get all Copper fill primitive
Signature
typescript
function getAll(): Promise<Array<IPCB_PrimitivePoured>>;1
Returns
Promise<Array<IPCB_PrimitivePoured>>
Array of Copper fill primitive objects
Example
javascript
// 1. 获取画布上全部覆铜填充图元
const pouredList = await eda.pcb_PrimitivePoured.getAll();
if (!pouredList || pouredList.length === 0) {
console.log('说明:PCB 上没有覆铜填充,请先手动绘制覆铜并重建(设计 → 覆铜)');
return;
}
// 2. 读取第一个覆铜填充的关键状态
const first = pouredList[0];
console.log('total poured:', pouredList.length);
console.log('first primitiveType:', first.getState_PrimitiveType());
console.log('first 关联覆铜边框 ID:', first.getState_PourPrimitiveId());
console.log('first 子区域数量:', first.getState_PourFills().length);1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14