Home > IPCB_PrimitiveComponent > isAsync
IPCB_PrimitiveComponent.isAsync() method
查询图元是否为异步图元
签名
typescript
function isAsync(): boolean;1
返回值
boolean
是否为异步图元
示例
javascript
// 1. 放置一个测试器件
const devices = await eda.lib_Device.search('C0402');
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
// 2. 查询异步状态
const isAsync = comp.isAsync();
// 3. 清理测试器件
await eda.pcb_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
console.log('isAsync:', isAsync);1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11