Home > PCB_Document > save
PCB_Document.save() method
Save Document
Signature
typescript
function save(): Promise<boolean>;1
Returns
Promise<boolean>
Whether the save operation was successful. Errors such as save failure and upload failure all return false
Example
javascript
// 1. 创建测试 PCB 并打开(保存作用于当前激活的 PCB)
const pcbUuid = await eda.dmt_Pcb.createPcb();
await new Promise(r => setTimeout(r, 1500));
await eda.dmt_EditorControl.openDocument(pcbUuid);
await new Promise(r => setTimeout(r, 1000));
// 2. 保存当前 PCB
const saved = await eda.pcb_Document.save();
console.log('saved:', saved);
// 3. 清理测试 PCB
await eda.dmt_Pcb.deletePcb(pcbUuid);1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12