Home > DMT_Board > getAllBoardsInfo
DMT_Board.getAllBoardsInfo() method
Get all in the project board detailed properties of
Signature
typescript
function getAllBoardsInfo(): Promise<Array<IDMT_BoardItem>>;1
Returns
Promise<Array<IDMT_BoardItem>>
Array of detailed properties of all Board
Example
javascript
// 1. 获取工程内所有板子
const boards = await eda.dmt_Board.getAllBoardsInfo();
// 2. 输出每块板子的名称与下属文档
boards.forEach((board, i) => {
console.log(`board[${i}]:`, board.name, 'schematic:', board.schematic?.uuid, 'pcb:', board.pcb?.uuid);
});
console.log('total:', boards.length);1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9