English
Home > ISCH_PrimitiveRectangle > getState_BindSchematicPageUuid
ISCH_PrimitiveRectangle.getState_BindSchematicPageUuid() method
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取属性状态:绑定的原理图图页 UUID
Signature
typescript
function getState_BindSchematicPageUuid(): string | null;1
Returns
string | null
绑定的原理图图页 UUID,null 表示未绑定
Remarks
本属性仅在原理图文档中有效;未绑定或刚解除绑定时返回 null ADD since EDA v4.1.103
Example
javascript
// 1. 读取当前选中矩形绑定到的图页 UUID
const selected = await eda.sch_SelectControl.getAllSelectedPrimitives();
const rect = selected.find(item => item.getState_PrimitiveType() === 'Rectangle');
if (!rect) {
console.log('说明:请先在画布上选中一个矩形图元');
return;
}
const pageUuid = rect.getState_BindSchematicPageUuid();
console.log('bindSchematicPageUuid:', pageUuid ?? '(未绑定)');1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10