Returns the number of registered library parts.
GSErrCode ACAPI_LibPart_GetNum ( Int32* count );
Parameters
- count
- [out] number of Library Parts.
Return Values
NoError
- The function has completed with success.
APIERR_BADPARS
count
isnullptr
For other common API errors see the API Errors.
Remarks
This function is used to get the number of currently available library parts. The number of the different type of library parts can not be obtained with this function; you have to walk through all the library parts to get e.g. the number of windows in the library.
Library Parts are referenced by indices. This function returns the maximal value such a reference; valid indices are in the [1 ? count
] range. The special value zero used some time to reference to an empty Library Part, as in case of an empty opening.
Example
API_LibPart libPart; Int32 i, count; GSErrCode err; err = ACAPI_LibPart_GetNum (&count); if (!err) { for (i = 1; i <= count; i++) { BNZeroMemory (&libPart, sizeof (API_LibPart)); libPart.index = i; err = ACAPI_LibPart_Get (&libPart); if (!err) { ACAPI_WriteReport ((const char *) GS::UniString (libPart.docu_UName).ToCStr (), false); } if (libPart.location != nullptr) delete libPart.location; } }
Requirements
- Version: API 1.3 or later
- Header: ACAPinc.h