Home > ISCH_PrimitivePin > getState_PinShape
ISCH_PrimitivePin.getState_PinShape() method
获取属性状态:引脚形状
签名
typescript
public getState_PinShape(): ESCH_PrimitivePinShape;1
返回值
引脚形状
示例
javascript
// 0. 确保当前文档是符号编辑器:优先复用测试符号,没有则新建后打开
const libUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
const found = await eda.lib_Symbol.search('嘉立创示例_Pin测试符号', libUuid);
const symUuid = found[0] ? found[0].uuid : await eda.lib_Symbol.create(libUuid, '嘉立创示例_Pin测试符号');
await eda.lib_Symbol.openInEditor(symUuid, libUuid);
// 1. 在符号画布上创建一个测试引脚,形状为 Clock(时钟标记)
const pin = await eda.sch_PrimitivePin.create(400, 300, '1', 'CLK', 0, 10, null, 'Clock', 'IN');
// 2. 读取引脚形状
const pinShape = pin.getState_PinShape();
// 3. 清理测试引脚(查询类需要清理)
await eda.sch_PrimitivePin.delete([pin.getState_PrimitiveId()]);
console.log('pinShape:', pinShape);1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16