Home > LIB_Footprint > modify
LIB_Footprint.modify() 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.
Modify Footprint
Signature
function modify(
footprintUuid: string,
libraryUuid: string,
footprintName?: string,
classification?: ILIB_ClassificationIndex | Array<string> | null,
description?: string | null,
otherProperty?: Record<string, boolean | number | string | undefined | null>,
model3D?: { name: string; uuid: string; libraryUuid: string },
): Promise<boolean>;2
3
4
5
6
7
8
9
Parameters
Parameter | Type | Description |
|---|---|---|
footprintUuid | string | Footprint UUID |
libraryUuid | string | Library UUID, you can use LIB_LibrariesList APIs in |
footprintName | string | (Optional) Footprint name |
classification | ILIB_ClassificationIndex | Array<string> | null | (Optional) Classification |
description | string | null | (Optional) Description |
otherProperty | Record<string, boolean | number | string | undefined | null> | (Optional) 其它属性,如希望清除某些属性,则将其的值设置为 |
model3D | { name: string; uuid: string; libraryUuid: string } | (Optional) 关联 3D 模型 ADD since v4.1.22 |
Returns
Promise<boolean>
Whether the operation is successful
Remarks
If you want to clear certain properties, set their values to null
Example
// 1. 获取个人库 UUID 并新建修改对象
const libraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
const footprintUuid = await eda.lib_Footprint.create(
libraryUuid,
`嘉立创示例_封装修改前_${Date.now()}`,
[],
'修改前的描述'
);
// 2. 修改名称和描述(分类保持不变传 [])
const newName = `嘉立创示例_封装修改后_${Date.now()}`;
const modified = await eda.lib_Footprint.modify(footprintUuid, libraryUuid, newName, [], '修改后的描述');
// 修改类保留现场
console.log('footprintUuid:', footprintUuid);
console.log('modified:', modified);
console.log('newName:', newName);2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18