Home > LIB_3DModel > delete
LIB_3DModel.delete() 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 3D model
Signature
typescript
function delete(modelUuid: string, libraryUuid: string): Promise<boolean>;1
Parameters
Parameter | Type | Description |
|---|---|---|
modelUuid | string | 3D model UUID |
libraryUuid | string | Library UUID, you can use LIB_LibrariesList APIs in |
Returns
Promise<boolean>
Whether the operation is successful
Example
javascript
// 1. 获取个人库 UUID
const libraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
// 2. 复制一个系统库模型到个人库作为删除对象
const results = await eda.lib_3DModel.search('0402', undefined, undefined, 1);
const source = results[0];
const copiedUuid = await eda.lib_3DModel.copy(
source.uuid,
source.libraryUuid,
libraryUuid,
undefined,
`ToDelete_${Date.now()}`
);
// 3. 删除复制品
const deleted = await eda.lib_3DModel.delete(copiedUuid, libraryUuid);
console.log('copiedUuid:', copiedUuid);
console.log('deleted:', deleted);1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19