Home > DMT_Schematic > getAllSchematicsInfo
DMT_Schematic.getAllSchematicsInfo() 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 in the project schematic detailed properties of
Signature
typescript
function getAllSchematicsInfo(): Promise<Array<IDMT_SchematicItem>>;1
Returns
Promise<Array<IDMT_SchematicItem>>
Array of detailed properties of all schematics
Example
javascript
// 1. 创建一个测试原理图并等 1.5s 同步,保证列表里有新近创建的对象
const schematicUuid = await eda.dmt_Schematic.createSchematic();
await new Promise(r => setTimeout(r, 1500));
// 2. 获取所有原理图的详细属性
const schematics = await eda.dmt_Schematic.getAllSchematicsInfo();
// 3. 输出每个原理图的名称、UUID 与图页数,确认测试原理图在列
schematics.slice(0, 10).forEach((s, i) => {
console.log(`schematic[${i}]:`, s.name, s.uuid, 'pages:', (s.page || []).length, 'board:', s.parentBoardName ?? '游离');
});
console.log('total:', schematics.length);
console.log('testSchematicIncluded:', schematics.some(s => s.uuid === schematicUuid));
// 4. 清理测试原理图
await new Promise(r => setTimeout(r, 1000));
const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
console.log('deleted:', deleted);1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18