简体中文
Home > IPCB_PrimitivePoured > getState_Layer
IPCB_PrimitivePoured.getState_Layer() method
获取属性状态:所属铜箔层
签名
typescript
function getState_Layer(): TPCB_LayersOfCopper;1
返回值
所属铜箔层
备注
本属性不可修改
示例
javascript
// 1. 获取画布上已有的覆铜填充图元
const pouredList = await eda.pcb_PrimitivePoured.getAll();
if (!pouredList || pouredList.length === 0) {
console.log('说明:PCB 上没有覆铜填充,请先手动绘制覆铜并重建(设计 → 覆铜)');
return;
}
// 2. 查看每个覆铜填充所处的铜箔层
pouredList.forEach(poured => {
console.log('primitiveId:', poured.getState_PrimitiveId(), 'layer:', poured.getState_Layer());
});1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11