ACAPI_​LibPart_​GetDetails

Returns the detail parameters of a registered Library Part.

    GSErrCode  ACAPI_LibPart_GetDetails (
        Int32                   libInd,
        API_LibPartDetails*     details
    );

 

Parameters

libInd
[in] Index of the Library Part
details
[out] Detail parameter of the Library Part

 

Return Values

NoError
The function has completed with success.
APIERR_BADPARS
any of the parameters are nullptr, or
the addressed Library Part is a macro, picture file etc.

For other common API errors see the API Errors.

 

Remarks

This function is used to get the detail parameters of a Library Part. These parameters can be edited in ARCHICAD by clicking the Details button on the parameter list editor dialog box.

The function works only on real Library Parts. In the case the type of the target Library Part is not listed below, the function returns an error code. This is since other type of Library Parts are just simple picture or text files which are enumerated and registered from the active library folders; such a picture or macro.

Applicable type of Library Parts are:

To change the parameters refer to the ACAPI_LibPart_SetDetails_ParamDef function.

 

Example


API_LibPartDetails    details;
API_LibPart           libPart;
GSErrCode             err;

BNZeroMemory (&libPart, sizeof (API_LibPart));
libPart.typeID = APILib_ObjectID;
GS::ucscpy (libPart.docu_UName, L("Test LibPart"));
err = ACAPI_LibPart_Search (&libPart, false);
if (libPart.index != 0) {
    err = ACAPI_LibPart_GetDetails (libPart.index, &details);
}

 

Requirements

Version: API 2.1 or later
Header: ACAPinc.h

 

See Also

API_LibPartDetails,
ACAPI_LibPart_SetDetails_ParamDef,
LibPart Manager, API Functions