ACAPI_​ModulData_​GetList

Returns a list of names of the custom data sections stored in the project database.

    GSErrCode  ACAPI_ModulData_GetList (
        GS::Array<GS::UniString>*     modulNameList
    );

 

Parameters

modulNameList
[out] List of moduldata names stored by the add-on into the current project.

 

Return Values

NoError
The information was returned successfully.
APIERR_BADPARS
The modulNameList parameter is nullptr.

For other common errors see the list of error codes.

 

Remarks

This function is used to retrieve a list of names of the custom data sections embedded by the add-on in the project database.

In order to get the stored data itself, use the ACAPI_ModulData_Get function using the names retrieved in the list. Empty list means no custom data section is stored in the project. If the project was saved in earlier format than Archicad 13, the modul name of the stored custom data is empty string (“”).

 

Example


GS::Array<GS::UniString> modulNameList;

ACAPI_ModulData_GetList (&modulNameList);

for (GS::Array<GS::UniString>::ConstIterator it = modulNameList.Enumerate (); it != nullptr; ++it) {
    API_ModulData modulData;
    BNZeroMemory (&modulData, sizeof (API_ModulData));
    if (ACAPI_ModulData_Get (&modulData, *it) == NoError) {
        // do something with the moduldata
    }
    BMKillHandle (&modulData.dataHdl);
}

 

Requirements

Version: API 13 or later
Header: ACAPinc.h

 

See Also

API_ModulData
ACAPI_ModulData_Get
ACAPI_ModulData_GetInfo
ACAPI_ModulData_Store
ACAPI_ModulData_Delete
ModulData Manager
API Functions