Home > IPCB_PrimitivePad > getState_HoleOffsetY
IPCB_PrimitivePad.getState_HoleOffsetY() method
Get the property state: hole offset Y
Signature
typescript
function getState_HoleOffsetY(): number;1
Returns
number
Hole offset Y
Example
javascript
// 1. 生成本次运行专用的坐标,创建一个孔心向上偏 20mil 的通孔焊盘
const x = 3000 + Math.floor(Math.random() * 100000);
const pad = await eda.pcb_PrimitivePad.create(12, '1', x, 3000, 0, ['ELLIPSE', 80, 80], '', ['ROUND', 30], 0, 20, 0, false, 0);
// 2. 读取孔偏移 Y
const holeOffsetY = pad.getState_HoleOffsetY();
// 3. 清理测试图元(查询类案例不留测试对象)
await eda.pcb_PrimitivePad.delete([pad.getState_PrimitiveId()]);
console.log('holeOffsetY:', holeOffsetY);1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11