Archicad 28 C++ API
Loading...
Searching...
No Matches
API_LibraryInfo Struct Reference

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

#include <APIdefs_Environment.h>

Public Attributes

IO::Location location
 the folder specification of the library
 
GS::UniString name
 the name of the library
 
API_LibraryTypeID libraryType
 the type of the library (Built-In, Local, Embedded, BIM Server, Web Object, Other; see API_LibraryTypeID)
 
bool available
 the library is available (e.g. not missing)
 
bool readOnly
 the library is not writable
 
bool filler [2]
 Reserved for later use.
 
GS::UniString twServerUrl
 URL address of the TeamWork server hosting the library (API_ServerLibrary only)
 
GS::UniString urlWebLibrary
 URL of the downloaded Internet library (API_UrlLibrary and API_UrlOtherObject only)
 

Detailed Description

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

Remarks
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 ACAPI_LibraryManagement_GetLibraries. Call the ACAPI_LibraryManagement_GetLibraries and ACAPI_LibraryManagement_SetLibraries function codes to operate on this data. 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.
Example
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);
}
}
Describes the data of an active library of an Archicad project.
Definition: APIdefs_Environment.h:654