Home > PCB_ManufactureData > getNetlistFile
PCB_ManufactureData.getNetlistFile() 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 the netlist file (Netlist)
Signature
typescript
function getNetlistFile(
fileName?: string,
netlistType?: ESYS_NetlistType,
): Promise<File | undefined>;1
2
3
4
2
3
4
Parameters
Parameter | Type | Description |
|---|---|---|
fileName | string | (Optional) File name |
netlistType | (Optional) Netlist type |
Returns
Promise<File | undefined>
Netlist file data
Remarks
You can use SYS_FileSystem.saveFile() API export the file to the local file system
Example
javascript
// 导出嘉立创 EDA 专业版格式网表
const netlistFile = await eda.pcb_ManufactureData.getNetlistFile(
'MyNetlist',
ESYS_NetlistType.JLCEDA_PRO
);
if (netlistFile) {
await eda.sys_FileSystem.saveFile(netlistFile);
}
// 导出 Altium Designer 格式
const altiumNetlist = await eda.pcb_ManufactureData.getNetlistFile(
'Netlist_Altium',
ESYS_NetlistType.ALTIUM_DESIGNER
);
// 导出 PADS 格式
const padsNetlist = await eda.pcb_ManufactureData.getNetlistFile(
'Netlist_PADS',
ESYS_NetlistType.PADS
);1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20