Home > PCB_ManufactureData > getManufactureData
PCB_ManufactureData.getManufactureData() 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.
Export the manufacture data
Signature
typescript
function getManufactureData(): Promise<File | undefined>;1
Returns
Promise<File | undefined>
Manufacture data
Remarks
This API corresponds to the one-click manufacture data export function of the private deployment edition
It will obtain the file data according to the configuration of the one-click manufacture data export popup on the front end
Note: This API is only valid for the private deployment edition. Calling it in other editions will always throw Error
Example
javascript
// 1. 按弹窗当前配置一键导出制造文件
try {
const manufactureFile = await eda.pcb_ManufactureData.getManufactureData();
console.log('制造文件大小:', manufactureFile?.size);
}
catch (e) {
// 非私有化部署版本调用会直接抛错,属预期行为
console.log('当前版本不支持一键导出制造文件(仅私有化部署版本有效)');
}1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9