Home > IPCB_PrimitiveArc > isAsync
IPCB_PrimitiveArc.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 arc = await eda.pcb_PrimitiveArc.create('', 1, 1000, 1000, 1500, 1300, 90, 10, 1, false);
const asyncOnCreate = arc.isAsync();
// 2. 切换到同步模式再查询一次,对比两种模式
arc.toSync();
const asyncAfterToSync = arc.isAsync();
// 3. 清理测试图元(查询类案例不留测试对象)
await eda.pcb_PrimitiveArc.delete([arc.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
2
3
4
5
6
7
8
9
10
11
12
13