Searches for registered Library Parts in the loaded libraries.
GSErrCode ACAPI_LibPart_PatternSearch (
const API_LibPart* ancestor,
const GS::UniString& pattern,
API_LibPart result[50],
Int32* numFound
);
Parameters
- ancestor
- [in] The library part type to search for
- pattern
- [in] Pattern to search for in the loaded librairies.
- result
- [out] Array to store the first 50 found library parts.
- numFound
- [out] Number of found library parts.
Return Values
NoError- The function has completed with success, the Library Part has been found (or reference created successfully if
createIfMissingistrue) APIERR_BADPARSancestorisnullptr,numFoundisnullptrorpatternis emptyAPIERR_BADID- no library part is found according to the given
typeIDorownUnIDas ancestor
For other common API errors see the API Errors.
Remarks
This function is used to search a Library Parts in the loaded libraries.
The search pattern can be one or more words or expression(s) in quotes.
Please remember that library parts are classified according to the subtype hierarchy as it is explained in the Library Part Subtypes chapter of this documentation. The expandable subtype system made the typeID based distinction of library parts obsolete, though you may use this field for searching by subtype instead of parentUnID for internal ancestor nodes (note that in this case APILib_ObjectID corresponds to Model Elements, and API_ZombieLibID marks the General Object subtype).
Requirements
- Version: API 16 or later
- Header: ACAPinc.h
See Also
API_LibPart
ACAPI_LibPart_Get, ACAPI_LibPart_Create
ACAPI_LibPart_Search
API Functions