Home > DMT_Schematic > getAllSchematicPagesInfo
DMT_Schematic.getAllSchematicPagesInfo() 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 sheet detailed properties of
Signature
typescript
function getAllSchematicPagesInfo(): Promise<Array<IDMT_SchematicPageItem>>;1
Returns
Promise<Array<IDMT_SchematicPageItem>>
Array of detailed properties of all schematic sheets
Example
javascript
// 1. 创建测试原理图并追加一页(共 2 页),保证列表里有新近创建的页
const schematicUuid = await eda.dmt_Schematic.createSchematic();
await new Promise(r => setTimeout(r, 1500));
await eda.dmt_Schematic.createSchematicPage(schematicUuid);
await new Promise(r => setTimeout(r, 1500));
// 2. 获取工程内所有图页的详细属性
const pages = await eda.dmt_Schematic.getAllSchematicPagesInfo();
// 3. 输出每页名称、UUID 与所属原理图,确认测试页在列
pages.slice(0, 10).forEach((p, i) => {
console.log(`page[${i}]:`, p.name, p.uuid, 'parent:', p.parentSchematicUuid);
});
console.log('total:', pages.length);
console.log('testPagesIncluded:', pages.filter(p => p.parentSchematicUuid === schematicUuid).length === 2);
// 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
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20