Home > DMT_Board > createBoard
DMT_Board.createBoard() method
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Create Board
Signature
typescript
function createBoard(schematicUuid?: string, pcbUuid?: string): Promise<string | undefined>;1
Parameters
Parameter | Type | Description |
|---|---|---|
schematicUuid | string | (Optional) Associated schematic UUID |
pcbUuid | string | (Optional) Associated PCB UUID |
Returns
Promise<string | undefined>
Board name, if it is undefined creation fails
Example
javascript
// 1. 无参调用,由系统自动创建一对原理图/PCB 文档并关联
const boardName = await eda.dmt_Board.createBoard();
console.log('create:', boardName);
// 2. 删除新板子(其关联文档是本例新建的,删除不影响其他板子),保持工程整洁
const deleted = await eda.dmt_Board.deleteBoard(boardName);
console.log('deleted:', deleted);1
2
3
4
5
6
7
2
3
4
5
6
7