Home > LIB_SimulationModel > search
LIB_SimulationModel.search() 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.
Search simulation models
Signature
typescript
function search(
key: string,
libraryUuid?: string,
classification?: Array<string>,
simulationModelType?: ELIB_SimulationModelType,
itemsOfPage?: number,
page?: number,
): Promise<Array<ILIB_SimulationModelSearchItem>>;1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
Parameters
Parameter | Type | Description |
|---|---|---|
key | string | Search keyword |
libraryUuid | string | (Optional) Library UUID, default is system library, you can use LIB_LibrariesList APIs in |
classification | Array<string> | (Optional) Classification, defaults to all |
simulationModelType | (Optional) Simulation model type, defaults to all | |
itemsOfPage | number | (Optional) Number of search results per page |
page | number | (Optional) Page count |
Returns
Promise<Array<ILIB_SimulationModelSearchItem>>
List of searched simulation model properties
Remarks
ADD since EDA v3.2.167
Example
javascript
// 1. 按空关键字列出系统库中的仿真模型,每页 5 条,只看 Ngspice 类型(换成 '2N3904' 等关键字即为按名称过滤)
const results = await eda.lib_SimulationModel.search('', undefined, undefined, 'Ngspice', 5, 1);
// 2. 输出搜索结果
console.log('count:', results.length);
results.forEach((item, i) => {
console.log(`[${i}] name:`, item.name, 'uuid:', item.uuid, 'libraryUuid:', item.libraryUuid);
});1
2
3
4
5
6
7
8
2
3
4
5
6
7
8