Home > DMT_Schematic > getSchematicPageInfo
DMT_Schematic.getSchematicPageInfo() 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 detailed properties of Schematic sheet
Signature
typescript
function getSchematicPageInfo(
schematicPageUuid: string,
): Promise<IDMT_SchematicPageItem | undefined>;1
2
3
2
3
Parameters
Parameter | Type | Description |
|---|---|---|
schematicPageUuid | string | Schematic sheet UUID |
Returns
Promise<IDMT_SchematicPageItem | undefined>
Schematic sheet detailed properties of; if it is undefined, the retrieval failed
Example
javascript
// 1. 创建测试原理图(自带图页 p1)并等 1.5s 同步
const schematicUuid = await eda.dmt_Schematic.createSchematic();
await new Promise(r => setTimeout(r, 1500));
const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
const pageUuid = info.page[0].uuid;
// 2. 按 UUID 查询图页详细属性
const pageInfo = await eda.dmt_Schematic.getSchematicPageInfo(pageUuid);
// 3. 输出属性
console.log('name:', pageInfo?.name);
console.log('itemType:', pageInfo?.itemType);
console.log('parentSchematicUuid:', pageInfo?.parentSchematicUuid);
console.log('showTitleBlock:', pageInfo?.showTitleBlock);
console.log('titleBlockFields:', Object.keys(pageInfo?.titleBlockData || {}).length);
// 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