Home > LIB_Footprint > create
LIB_Footprint.create() 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.
Create Footprint
Signature
typescript
function create(
libraryUuid: string,
footprintName: string,
classification?: ILIB_ClassificationIndex | Array<string>,
description?: string,
otherProperty?: Record<string, boolean | number | string | undefined>,
model3D?: { name: string; uuid: string; libraryUuid: string },
): Promise<string | undefined>;1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
Parameters
Parameter | Type | Description |
|---|---|---|
libraryUuid | string | Library UUID, you can use LIB_LibrariesList APIs in |
footprintName | string | Footprint name |
classification | ILIB_ClassificationIndex | Array<string> | (Optional) Classification |
description | string | (Optional) Description |
otherProperty | Record<string, boolean | number | string | undefined> | (Optional) 其它属性 |
model3D | { name: string; uuid: string; libraryUuid: string } | (Optional) 关联 3D 模型 ADD since EDA v4.1.22 |
Returns
Promise<string | undefined>
Footprint UUID
Example
javascript
// 1. 获取个人库 UUID
const libraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
// 2. 创建封装(分类传 [] = 不分类)
const footprintName = `嘉立创示例_新封装_${Date.now()}`;
const footprintUuid = await eda.lib_Footprint.create(libraryUuid, footprintName, [], '示例封装描述');
// 创建类保留现场(新封装留在个人库中供观察)
console.log('footprintUuid:', footprintUuid);
console.log('footprintName:', footprintName);1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11