Home > IPCB_PrimitivePad > getState_Pad
IPCB_PrimitivePad.getState_Pad() method
Get the property state: pad shape
Signature
typescript
function getState_Pad(): TPCB_PrimitivePadShape | undefined;1
Returns
TPCB_PrimitivePadShape | undefined
Pad shape
Example
javascript
// 1. 生成本次运行专用的坐标,创建一个圆形贴片焊盘
const x = 3000 + Math.floor(Math.random() * 100000);
const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 0, ['ELLIPSE', 60, 60], '', null, 0, 0, 0, false, 0);
// 2. 读取焊盘外形
const padShape = pad.getState_Pad();
// 3. 清理测试图元(查询类案例不留测试对象)
await eda.pcb_PrimitivePad.delete([pad.getState_PrimitiveId()]);
console.log('padShape:', padShape);1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11