Home > ISCH_PrimitiveCbbSymbolComponent > getState_CbbSymbol
ISCH_PrimitiveCbbSymbolComponent.getState_CbbSymbol() method
获取属性状态:关联复用模块符号
签名
typescript
function getState_CbbSymbol(): {
libraryUuid: string;
cbbUuid: string;
uuid?: undefined | string;
name?: undefined | string;
};1
2
3
4
5
6
2
3
4
5
6
返回值
{ libraryUuid: string; cbbUuid: string; uuid?: undefined | string; name?: undefined | string }
关联复用模块符号
示例
javascript
// 1. 从系统库搜索一个复用模块
const cbbList = await eda.lib_Cbb.search('');
const cbb = cbbList[0];
// 2. 在画布上放置该模块的符号(未指定具体符号 uuid,使用模块默认符号)
const symbol = await eda.sch_PrimitiveComponent.createCbbSymbol(
{ libraryUuid: cbb.libraryUuid, cbbUuid: cbb.uuid },
1000,
1000
);
// 3. 读取符号定义信息(libraryUuid + cbbUuid 必有,uuid/name 未指定时为空)
const cbbSymbol = symbol.getState_CbbSymbol();
// 4. 清理测试图元(查询类案例不留测试对象)
await eda.sch_PrimitiveComponent.delete([symbol.getState_PrimitiveId()]);
console.log('cbbSymbol:', cbbSymbol);1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18