Home > IPCB_PrimitiveComponent > getState_Rotation
IPCB_PrimitiveComponent.getState_Rotation() method
Get the property state: rotation angle
Signature
typescript
function getState_Rotation(): number;1
Returns
number
Rotation angle
Example
javascript
// 1. 放置一个测试器件(默认 0 度)
const devices = await eda.lib_Device.search('C0402');
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
// 2. 读取旋转角度
const rotation = comp.getState_Rotation();
// 3. 清理测试器件
await eda.pcb_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
console.log('rotation:', rotation);1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11