Home > SCH_PrimitiveArc > getAll
SCH_PrimitiveArc.getAll() method
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Get all Arc
Signature
typescript
public getAll(): Promise<Array<ISCH_PrimitiveArc>>;1
Returns
Promise<Array<ISCH_PrimitiveArc>>
Array of Arc primitive objects
Example
javascript
// 1. 创建一段测试圆弧作为查找目标(随机坐标避免重合)
const x = 2000 + Math.floor(Math.random() * 8000);
const y = 2000 + Math.floor(Math.random() * 8000);
const arc = await eda.sch_PrimitiveArc.create(x, y, x + 100, y + 100, x + 200, y);
const arcId = arc.getState_PrimitiveId();
// 2. 获取当前原理图页上的全部圆弧
const all = await eda.sch_PrimitiveArc.getAll();
// 3. 清理测试图元(查询类需要清理)
await eda.sch_PrimitiveArc.delete([arcId]);
console.log('total arcs:', all.length);
console.log('marker arc found:', all.some(a => a.getState_PrimitiveId() === arcId));1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14