Home > DMT_Schematic > getSchematicInfo
DMT_Schematic.getSchematicInfo() method
此 API 当前处于 BETA 预览状态,希望得到开发者的反馈。它的任何功能都可能在接下来的开发进程中被修改,请不要将它用于任何正式环境。
获取原理图的详细属性
签名
typescript
function getSchematicInfo(schematicUuid: string): Promise<IDMT_SchematicItem | undefined>;1
参数名
参数 | 类型 | 描述 |
|---|---|---|
schematicUuid | string | 原理图 UUID |
返回值
Promise<IDMT_SchematicItem | undefined>
原理图的详细属性,如若为 undefined 则获取失败
示例
javascript
// 1. 创建测试原理图并等 1.5s 同步
const schematicUuid = await eda.dmt_Schematic.createSchematic();
await new Promise(r => setTimeout(r, 1500));
// 2. 按 UUID 查询原理图详细属性
const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
// 3. 输出属性
console.log('name:', info?.name);
console.log('itemType:', info?.itemType);
console.log('parentProjectUuid:', info?.parentProjectUuid);
console.log('pages:', (info?.page || []).map(p => p.name).join(', '));
// 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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17