Returns the number of registered library parts.

    GSErrCode  ACAPI_LibPart_GetNum (
        Int32*     count



[out] number of Library Parts.


Return Values

The function has completed with success.
count is nullptr

For other common API errors see the API Errors.



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.



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;



Version: API 1.3 or later
Header: ACAPinc.h


See Also

LibPart Manager, API Functions