Home > IPCB_PrimitivePad > getState_PadType
IPCB_PrimitivePad.getState_PadType() method
获取属性状态:焊盘类型
签名
typescript
function getState_PadType(): EPCB_PrimitivePadType;1
返回值
焊盘类型
示例
javascript
// 1. 生成本次运行专用的坐标,创建一个普通焊盘和一个标识点
const x = 3000 + Math.floor(Math.random() * 100000);
const normal = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
const mark = await eda.pcb_PrimitivePad.create(1, '2', x + 500, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 2);
// 2. 分别读取焊盘类型(0=普通 1=测试点 2=标识点)
const normalType = normal.getState_PadType();
const markType = mark.getState_PadType();
// 3. 清理测试图元(查询类案例不留测试对象)
await eda.pcb_PrimitivePad.delete([normal.getState_PrimitiveId(), mark.getState_PrimitiveId()]);
console.log('normalType:', normalType);
console.log('markType:', markType);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