Describes the data of an active library of an Archicad project.

    typedef struct {
        IO::Location          location;
        GS::UniString         name;
        API_LibraryTypeID     libraryType;
        bool                  available;
        bool                  readOnly;
        bool                  filler[2];
        GS::UniString         twServerUrl;
        GS::UniString         urlWebLibrary;
    } API_LibraryInfo;



the folder specification of the library
the name of the library
libraryType API 20
the type of the library (Built-In, Local, Embedded, BIM Server, Web Object, Other; see API_LibraryTypeID)
available API 20
the library is available (e.g. not missing)
readOnly API 20
the library is not writable
twServerUrl API 20
URL address of the TeamWork server hosting the library (API_ServerLibrary only)
urlWebLibrary API 20
URL of the downloaded Internet library (API_UrlLibrary and API_UrlOtherObject only)



This data structure describes one active library from the library list of Archicad. All the libraries that can be seen in the “Library Manager” dialog of Archicad are passed to you with APIEnv_GetLibrariesID.

Call the ACAPI_Environment function with the APIEnv_GetLibrariesID and APIEnv_SetLibrariesID function codes to operate on this data.

6.1  From 6.1 those library locations which refer to built-in libraries (e.g. library parts coming from an add-on) have an “rfs” component at the end. This is necessary if you want to convert the location to a folder, but you can safely remove this component for display purposes with IO::Location::DeleteLastLocalName or IO::Location::MoveLastLocalName.



GS::Array<API_LibraryInfo>    libInfo;

if (ACAPI_Environment (APIEnv_GetLibrariesID, &libInfo) == NoError) {
    DBPrintf ("Environment Control :: The number of loaded libraries is %u\n", libInfo.GetSize ());
    for (UInt32 ii = 0; ii < libInfo.nLib; ii++) {
        IO::Path    libPath;

        libInfo[ii].location.ToPath (&libPath);
        DBPrintf ("Environment Control :: Library #%-2d is %s\n", ii, (const char *) libPath);



Version: API 18 or later
Header: APIdefs_Environment.h


See Also

APIEnv_GetLibrariesID, APIEnv_SetLibrariesID, ACAPI_Environment, API Types