Home > PCB_ManufactureData > getOpenDatabaseDoublePlusFile
PCB_ManufactureData.getOpenDatabaseDoublePlusFile() 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.
Get ODB++ file
Signature
function getOpenDatabaseDoublePlusFile(
fileName?: string,
unit?: ESYS_Unit.INCH | ESYS_Unit.MILLIMETER,
otherData?: {
metallizedDrilledHoles?: undefined | false | true;
nonMetallizedDrilledHoles?: undefined | false | true;
drillTable?: undefined | false | true;
flyingProbeTestFile?: undefined | false | true;
},
layers?: Array<{ layerId: EPCB_LayerId; mirror: boolean }>,
objects?: Array<{ objectName: string }>,
): Promise<File | undefined>;2
3
4
5
6
7
8
9
10
11
12
Parameters
Parameter | Type | Description |
|---|---|---|
fileName | string | (Optional) File name |
unit | (Optional) Unit | |
otherData | { metallizedDrilledHoles?: undefined | false | true; nonMetallizedDrilledHoles?: undefined | false | true; drillTable?: undefined | false | true; flyingProbeTestFile?: undefined | false | true } | (Optional) Other |
layers | Array<{ layerId: EPCB_LayerId; mirror: boolean }> | (Optional) Exported layers. By default, they are exported according to EasyEDA production requirements |
objects | Array<{ objectName: string }> | (Optional) Exported objects. By default, they are exported according to EasyEDA production requirements |
Returns
Promise<File | undefined>
ODB++ file data
Remarks
You can use SYS_FileSystem.saveFile() API export the file to the local file system
Example
// 导出 ODB++ 文件,自定义单位和选项
const odbFile = await eda.pcb_ManufactureData.getOpenDatabaseDoublePlusFile(
'MyBoard_ODB',
ESYS_Unit.INCH,
{
metallizedDrilledHoles: true,
nonMetallizedDrilledHoles: true,
drillTable: true,
flyingProbeTestFile: false
}
);
if (odbFile) {
await eda.sys_FileSystem.saveFile(odbFile);
}2
3
4
5
6
7
8
9
10
11
12
13
14