Home > DMT_Workspace > getCurrentWorkspaceInfo
DMT_Workspace.getCurrentWorkspaceInfo() method
Get the detailed properties of the current workspace
Signature
typescript
function getCurrentWorkspaceInfo(): Promise<IDMT_WorkspaceItem | undefined>;1
Returns
Promise<IDMT_WorkspaceItem | undefined>
Detailed properties of the workspace. If it is undefined, the retrieval failed
Remarks
It will get the detailed properties of the current workspace
Example
javascript
// 1. 获取当前工作区属性
const workspace = await eda.dmt_Workspace.getCurrentWorkspaceInfo();
// 2. 输出当前工作区属性(uuid 可直接用作 toggleToWorkspace 的切换参数)
console.log('当前工作区名称:', workspace?.name);
console.log('当前工作区 uuid:', workspace?.uuid);1
2
3
4
5
6
2
3
4
5
6