Home > DMT_Project > getAllProjectsUuid
DMT_Project.getAllProjectsUuid() method
Get the UUIDs of all projects
Signature
typescript
function getAllProjectsUuid(
teamUuid?: string,
folderUuid?: string,
workspaceUuid?: string,
): Promise<Array<string>>;1
2
3
4
5
2
3
4
5
Parameters
Parameter | Type | Description |
|---|---|---|
teamUuid | string | (Optional) Team UUID |
folderUuid | string | (Optional) Folder UUID. If not specified, it defaults to the root folder of the team |
workspaceUuid | string | (Optional) Workspace UUID |
Returns
Promise<Array<string>>
Project UUID array
Remarks
If teamUuid is specified, all projects under the specified team are obtained;
If folderUuid is specified, all projects under the specified folder are obtained;
teamUuid, folderUuid only one of them may be specified, if both are specified, only folderUuid;
If workspaceUuid is specified, all projects under the specified team/folder are obtained in the specified Workspace
Example
javascript
// 1. 取当前工程所属团队
const projectInfo = await eda.dmt_Project.getCurrentProjectInfo();
const teamUuid = projectInfo.teamUuid;
// 2. 获取该团队下所有工程的 UUID
const projectUuids = await eda.dmt_Project.getAllProjectsUuid(teamUuid);
console.log('projectCount:', projectUuids.length);
console.log('projectUuids:', projectUuids.join(', '));1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9