Home > ISCH_PrimitiveCbbSymbolComponent > getState_Cbb
ISCH_PrimitiveCbbSymbolComponent.getState_Cbb() method
Get the property state: associate reuse block
Signature
typescript
function getState_Cbb(): { libraryUuid: string; uuid: string };1
Returns
{ libraryUuid: string; uuid: string }
Associate reuse block
Example
javascript
// 1. 从系统库搜索一个复用模块
const cbbList = await eda.lib_Cbb.search('');
const cbb = cbbList[0];
// 2. 在画布上放置该模块的符号(SCH 坐标单位 10mil)
const symbol = await eda.sch_PrimitiveComponent.createCbbSymbol(
{ libraryUuid: cbb.libraryUuid, cbbUuid: cbb.uuid },
1000,
1000
);
// 3. 读取符号关联的复用模块(libraryUuid + 模块 uuid,与放置时传入的一致)
const cbbInfo = symbol.getState_Cbb();
// 4. 清理测试图元(查询类案例不留测试对象)
await eda.sch_PrimitiveComponent.delete([symbol.getState_PrimitiveId()]);
console.log('cbbInfo:', cbbInfo);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