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