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