Home > SCH_ManufactureData > deleteBomTemplate
SCH_ManufactureData.deleteBomTemplate() 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.
Delete BOM template
Signature
typescript
public deleteBomTemplate(template: string): Promise<boolean>;1
Parameters
Parameter | Type | Description |
|---|---|---|
template | string | BOM template name |
Returns
Promise<boolean>
Whether the operation is successful
Example
javascript
// 1. 查看当前账号下的 BOM 模板
const templates = await eda.sch_ManufactureData.getBomTemplates();
console.log('当前模板:', templates.join('、'));
// 2. 删除一个不存在的模板名,验证 API 的返回行为(不影响任何已有模板)
const success = await eda.sch_ManufactureData.deleteBomTemplate('嘉立创示例_不存在的模板');
console.log('删除不存在模板的返回值:', success);1
2
3
4
5
6
7
2
3
4
5
6
7