Home > IPCB_PrimitiveDimension > isAsync
IPCB_PrimitiveDimension.isAsync() method
Query whether the primitive is an async primitive
Signature
typescript
function isAsync(): boolean;1
Returns
boolean
Whether Is async primitive
Example
javascript
// 1. 创建一个长度标注,创建后默认处于异步模式
const dim = await eda.pcb_PrimitiveDimension.create(
'Length Dimension',
[1000, 1000, 1000, 800, 3000, 800, 3000, 1000],
3
);
const asyncOnCreate = dim.isAsync();
// 2. 切换到同步模式再查询一次,对比两种模式
dim.toSync();
const asyncAfterToSync = dim.isAsync();
// 3. 清理测试图元(查询类案例不留测试对象)
await eda.pcb_PrimitiveDimension.delete([dim.getState_PrimitiveId()]);
console.log('isAsync on create:', asyncOnCreate);
console.log('isAsync after toSync:', asyncAfterToSync);1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17