Home > DMT_Project > openProject
DMT_Project.openProject() method
Open project
Signature
typescript
function openProject(projectUuid: string): Promise<boolean>;1
Parameters
Parameter | Type | Description |
|---|---|---|
projectUuid | string | Project UUID |
Returns
Promise<boolean>
Whether Successful open project
Remarks
This operation will open the specified project in the EDA front end. If another project was previously opened with unsaved changes, executing this operation will directly lose all unsaved data
Example
javascript
// 1. 取当前工程 UUID(打开自身,避免切换到其它工程)
const info = await eda.dmt_Project.getCurrentProjectInfo();
const projectUuid = info.uuid;
// 2. 打开该工程
const opened = await eda.dmt_Project.openProject(projectUuid);
console.log('opened:', opened);1
2
3
4
5
6
7
8
2
3
4
5
6
7
8