Home > ISCH_PrimitiveComponent > getState_Y
ISCH_PrimitiveComponent.getState_Y() method
获取属性状态:坐标 Y
签名
typescript
function getState_Y(): number;1
返回值
number
坐标 Y
示例
javascript
// 1. 放置一个测试器件(SCH 坐标单位 10mil,100 ≈ 25.4mm)
const devices = await eda.lib_Device.search('C0402');
const comp = await eda.sch_PrimitiveComponent.create(devices[0], 600, 600);
const compId = comp.getState_PrimitiveId();
// 2. 读取放置位置的 Y 坐标(与放置时传入值一致)
const y = comp.getState_Y();
// 3. 清理测试器件(查询类需要清理)
await eda.sch_PrimitiveComponent.delete([compId]);
console.log('y:', y);1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12