Home > DMT_Board > deleteBoard
DMT_Board.deleteBoard() method
Delete Board
Signature
typescript
function deleteBoard(boardName: string): Promise<boolean>;1
Parameters
Parameter | Type | Description |
|---|---|---|
boardName | string | Board name |
Returns
Promise<boolean>
Whether the operation is successful
Remarks
If the specified board does not exist, the API will return false, indicating that the operation failed
Example
javascript
// 1. 复制一块板子作为删除目标,避免误删工程里有用的板子
const boards = await eda.dmt_Board.getAllBoardsInfo();
const tempName = await eda.dmt_Board.copyBoard(boards[0].name);
console.log('temp board:', tempName);
// 2. 删除该板子
const deleted = await eda.dmt_Board.deleteBoard(tempName);
console.log('deleted:', deleted);1
2
3
4
5
6
7
8
2
3
4
5
6
7
8