Home > ISCH_PrimitiveArc > isAsync
ISCH_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.sch_PrimitiveArc.create(400, 300, 500, 400, 600, 300, null, null, 6, 1);
const asyncOnCreate = arc.isAsync();
// 2. 切换到同步模式再查询一次,对比两种模式
arc.toSync();
const asyncAfterToSync = arc.isAsync();
// 3. 清理测试图元(查询类案例不留测试对象)
await eda.sch_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