Home > DMT_Board > getBoardInfo
DMT_Board.getBoardInfo() method
Get detailed properties of Board
Signature
typescript
function getBoardInfo(boardName: string): Promise<IDMT_BoardItem | undefined>;1
Parameters
Parameter | Type | Description |
|---|---|---|
boardName | string | Board name |
Returns
Promise<IDMT_BoardItem | undefined>
Board detailed properties of; if it is undefined, the retrieval failed
Example
javascript
// 1. 先盘点所有板子,取第一块的名称作为查询目标
const boards = await eda.dmt_Board.getAllBoardsInfo();
const targetName = boards[0].name;
// 2. 按名称查询该板子的详细属性
const board = await eda.dmt_Board.getBoardInfo(targetName);
// 3. 输出板子属性
console.log('name:', board.name);
console.log('parentProjectUuid:', board.parentProjectUuid);
console.log('schematic:', board.schematic?.uuid);
console.log('pcb:', board.pcb?.uuid);1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12