Home > IPCB_PrimitiveComponent > getState_Footprint
IPCB_PrimitiveComponent.getState_Footprint() method
获取属性状态:关联库封装
签名
typescript
function getState_Footprint():
{ libraryUuid: string; uuid: string; name?: undefined | string } | undefined;1
2
2
返回值
{ libraryUuid: string; uuid: string; name?: undefined | string } | undefined
关联库封装
示例
javascript
// 1. 放置一个测试器件
const devices = await eda.lib_Device.search('C0402');
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
// 2. 读取关联的库封装信息
const footprint = comp.getState_Footprint();
// 3. 清理测试器件
await eda.pcb_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
console.log('footprintName:', footprint.name);
console.log('footprintUuid:', footprint.uuid);
console.log('libraryUuid:', footprint.libraryUuid);1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13