Home > DMT_Team > getCurrentTeamInfo
DMT_Team.getCurrentTeamInfo() method
获取当前团队的详细属性
签名
typescript
function getCurrentTeamInfo(): Promise<IDMT_TeamItem | undefined>;1
返回值
Promise<IDMT_TeamItem | undefined>
团队的详细属性,如若为 undefined 则获取失败
备注
将会获取当前打开且拥有最后输入焦点的原理图、PCB、面板所关联的工程的所属团队的详细属性
示例
javascript
// 1. 获取当前团队属性
const team = await eda.dmt_Team.getCurrentTeamInfo();
// 2. 输出当前团队属性(uuid 常用作后续 DMT_Folder/Project API 的 teamUuid 参数)
console.log('当前团队名称:', team?.name);
console.log('当前团队 uuid:', team?.uuid);
console.log('当前团队身份 ID:', team?.identity);1
2
3
4
5
6
7
2
3
4
5
6
7