Home > SCH_ManufactureData > getBomTemplateFile
SCH_ManufactureData.getBomTemplateFile() 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 BOM template file
Signature
typescript
public getBomTemplateFile(template: string): Promise<File | undefined>;1
Parameters
Parameter | Type | Description |
|---|---|---|
template | string | BOM template name |
Returns
Promise<File | undefined>
BOM template file
Example
javascript
// 1. 先拿到账号下可用的 BOM 模板列表
const templates = await eda.sch_ManufactureData.getBomTemplates();
console.log('可用模板:', templates.join('、'));
// 2. 导出第一个模板的文件
const templateFile = await eda.sch_ManufactureData.getBomTemplateFile(templates[0]);
// 3. 查看导出结果
console.log('模板文件大小:', templateFile?.size);1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9