Home > ISCH_PrimitiveText > getState_X
ISCH_PrimitiveText.getState_X() method
Get the property state: X coordinate
Signature
typescript
function getState_X(): number;1
Returns
number
X coordinate
Example
javascript
// 1. 创建一个测试文本(SCH 坐标单位 10mil,1mm ≈ 3.937 单位)
const text = await eda.sch_PrimitiveText.create(400, 300, '嘉立创示例_文本');
// 2. 读取定位点 X 坐标
const x = text.getState_X();
// 3. 清理测试图元(查询类案例不留测试对象)
await eda.sch_PrimitiveText.delete([text.getState_PrimitiveId()]);
console.log('x:', x);1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10