Home > SCH_ManufactureData > getNetlistFile
SCH_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
// 1. 导出 Altium Designer 格式的网表('Protel2' 对应 ESYS_NetlistType.ALTIUM_DESIGNER)
try {
const netlistFile = await eda.sch_ManufactureData.getNetlistFile('嘉立创示例_网表', 'Protel2');
console.log('导出文件名:', netlistFile?.name);
console.log('文件大小:', netlistFile?.size);
}
catch (e) {
// 原理图数据不满足网表校验(如引脚编号重复)时会抛错
console.log('当前原理图数据不满足网表导出要求,导出未完成');
}1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10