Archicad 28 C++ API
|
Functions to load, iterate and manipulate libraries and library parts. More...
Classes | |
struct | ACAPI::Library::v1::GSMSectionData |
Raw GSMObject Section representation. More... | |
class | ACAPI::Library::v1::GSMObject |
GSMObject is the representation of a loaded .gsm file. More... | |
class | ACAPI::Library::v1::LibPart |
LibPart is the representation of a file-like item in a Library (.gsm, .png, .lis, etc..) More... | |
class | ACAPI::Library::v1::Library |
Library is the representation of an item in the library list of an ArchiCAD project. More... | |
class | ACAPI::Library::v1::LibraryManager |
LibraryManager is the central point of the Library and the LibPart management. More... | |
class | ACAPI::Library::v1::LibraryTreePath |
Library tree location (E.g. folder, Library Part) More... | |
struct | API_LibraryInfo |
Describes the data of an active library of an Archicad project. More... | |
Enumerations | |
enum class | ACAPI::Library::v1::GSMObject::CopyMethod { GenerateNewUnID , KeepMainGuid } |
Control flags for the copy of the GSM objects. More... | |
enum class | ACAPI::Library::v1::LibPartType { Object , Image , Text , BinaryListCrit , Other } |
File type of a library part. More... | |
enum | API_LibraryTypeID { API_Undefined , API_LocalLibrary , API_UrlLibrary , API_BuiltInLibrary , API_EmbeddedLibrary , API_OtherObject , API_UrlOtherObject , API_ServerLibrary } |
Project library types. More... | |
Functions | |
static ACAPI::Result< GSMObject > | ACAPI::Library::v1::GSMObject::CreateNew (const IO::Location &fileLocation, const ACAPI::Library::v1::GSMObject &ancestorSubType) |
Creates a new empty GSM Object. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::CopyTo (const IO::Location &fileLocation, CopyMethod method=CopyMethod::KeepMainGuid) |
Creates a new copy from the GSM file to a location. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::Modify (const std::function< GSErrCode(Modifier &)> &modifierFunc, GS::UniString password=GS::EmptyUniString) |
Opens a modification scope if the object is editable. See 'IsEditable'. | |
bool | ACAPI::Library::v1::GSMObject::IsEditable () const |
A GSM file is editable if it is loaded from the local file system. GSM files from Loaded Libraries should be copied into a local directory before editing. | |
ACAPI::Result< GS::UnID > | ACAPI::Library::v1::GSMObject::GetUnID () const |
The UnID is a combination of the main guid and the revision guid. | |
ACAPI::Result< bool > | ACAPI::Library::v1::GSMObject::IsPlaceable () const |
The object can be placed in a plan file. | |
ACAPI::Result< bool > | ACAPI::Library::v1::GSMObject::IsPasswordProtected () const |
The object is password protected and encrypted. | |
ACAPI::Result< GS::UnID > | ACAPI::Library::v1::GSMObject::GetSubTypeUnID () const |
The UnID of the object's direct ancestor in the subtype hierarchy. | |
ACAPI::Result< bool > | ACAPI::Library::v1::GSMObject::IsSubType () const |
The object is an 'object subtype'. | |
ACAPI::Result< bool > | ACAPI::Library::v1::GSMObject::IsInSubTypeOf (const GS::UnID &subTypeID) const |
The object is a subtype of the given UnID. | |
bool | ACAPI::Library::v1::GSMObject::HasMasterScript () const |
Checks whether MasterScript has value or is empty. | |
bool | ACAPI::Library::v1::GSMObject::Has2DScript () const |
Checks whether 2DScript section has value or is empty. | |
bool | ACAPI::Library::v1::GSMObject::Has3DScript () const |
Checks whether 3DScript section has value or is empty. | |
bool | ACAPI::Library::v1::GSMObject::HasPropertiesScript () const |
Checks whether PropertiesScript section has value or is empty. | |
bool | ACAPI::Library::v1::GSMObject::HasParameterScript () const |
Checks whether ParameterScript section has value or is empty. | |
bool | ACAPI::Library::v1::GSMObject::HasInterfaceScript () const |
Checks whether InterfaceScript section has value or is empty. | |
bool | ACAPI::Library::v1::GSMObject::HasForwardMigrationScript () const |
Checks whether ForwardMigrationScript section has value or is empty. | |
bool | ACAPI::Library::v1::GSMObject::HasBackwardMigrationScript () const |
Checks whether BackwardMigrationScript section has value or is empty. | |
bool | ACAPI::Library::v1::GSMObject::Has2DVectorImage () const |
Checks whether 2DVectorImage section has value or is empty. | |
bool | ACAPI::Library::v1::GSMObject::HasPreviewPicture () const |
Checks whether PreviewPicture section has value or is empty. | |
bool | ACAPI::Library::v1::GSMObject::HasGDLPictures () const |
Checks whether GDLPictures section has value or is empty. | |
bool | ACAPI::Library::v1::GSMObject::HasCustomSection (uint32_t sectionTypeID, uint16_t index) const |
Checks whether CustomSection has value or is empty. | |
ACAPI::Result< GS::UniString > | ACAPI::Library::v1::GSMObject::GetAuthor () const |
Author of the object. | |
ACAPI::Result< GS::UniString > | ACAPI::Library::v1::GSMObject::GetLicense () const |
License name of the object. | |
ACAPI::Result< GS::UniString > | ACAPI::Library::v1::GSMObject::GetLicenseVersion () const |
License version of the object. | |
ACAPI::Result< GS::UniString > | ACAPI::Library::v1::GSMObject::GetDescription () const |
Description of the object. | |
ACAPI::Result< GS::UniString > | ACAPI::Library::v1::GSMObject::GetKeywords () const |
Keywords of the object. Mostly used for search. Usually it is a comma separated list. | |
ACAPI::Result< GDL::Parameters > | ACAPI::Library::v1::GSMObject::GetParameters () const |
Parameter list of the object. | |
ACAPI::Result< std::vector< GS::UniString > > | ACAPI::Library::v1::GSMObject::GetParameterDescriptions () const |
Parameter descriptions of the object. | |
ACAPI::Result< GS::UniString > | ACAPI::Library::v1::GSMObject::GetMasterScript (const GS::UniString &password=GS::EmptyUniString) const |
Master script of the object. | |
ACAPI::Result< GS::UniString > | ACAPI::Library::v1::GSMObject::Get2DScript (const GS::UniString &password=GS::EmptyUniString) const |
2D script of the object. | |
ACAPI::Result< GS::UniString > | ACAPI::Library::v1::GSMObject::Get3DScript (const GS::UniString &password=GS::EmptyUniString) const |
3D script of the object. | |
ACAPI::Result< GS::UniString > | ACAPI::Library::v1::GSMObject::GetPropertiesScript (const GS::UniString &password=GS::EmptyUniString) const |
Properties script of the object. | |
ACAPI::Result< GS::UniString > | ACAPI::Library::v1::GSMObject::GetParameterScript (const GS::UniString &password=GS::EmptyUniString) const |
Parameter script of the object. | |
ACAPI::Result< GS::UniString > | ACAPI::Library::v1::GSMObject::GetInterfaceScript (const GS::UniString &password=GS::EmptyUniString) const |
Interface script of the object. | |
ACAPI::Result< bool > | ACAPI::Library::v1::GSMObject::IsUIDefault () const |
The defined interface is set as default UI. | |
ACAPI::Result< bool > | ACAPI::Library::v1::GSMObject::IsHierarchicalPagesUsed () const |
The defined interface uses hierarchical pages. | |
ACAPI::Result< GS::UniString > | ACAPI::Library::v1::GSMObject::GetForwardMigrationScript (const GS::UniString &password=GS::EmptyUniString) const |
Forward Migration script of the object. | |
ACAPI::Result< GS::UniString > | ACAPI::Library::v1::GSMObject::GetBackwardMigrationScript (const GS::UniString &password=GS::EmptyUniString) const |
Backward Migration script of the object. | |
ACAPI::Result< VectorImage > | ACAPI::Library::v1::GSMObject::Get2DVectorImage () const |
2D Vector Image of the object. | |
ACAPI::Result< GX::ImageRef > | ACAPI::Library::v1::GSMObject::GetPreviewPicture () const |
Preview picture of the object. | |
ACAPI::Result< std::vector< GX::ImageRef > > | ACAPI::Library::v1::GSMObject::GetGDLPictures () const |
Embedded pictures of the object. | |
ACAPI::Result< GSMSectionData > | ACAPI::Library::v1::GSMObject::GetCustomSection (uint32_t sectionID, uint16_t index=0) const |
Custom section data of the object. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::SetPlaceable (bool placeable) |
Sets the placeable flag of the object. If true, the object can be placed in a plan file. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::SetPassword (const GS::UniString &newPassword) |
Sets the password of the object. If a password is set, it will encrypt and lock the object. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::SetIsSubtype (bool isSubType) |
Sets the object as a subtype. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::SetAuthor (const GS::UniString &author) |
Sets the author of the object. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::SetLicense (const GS::UniString &license) |
Sets the license code of the object. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::SetLicenseVersion (const GS::UniString &licVer) |
Sets the license version of the object. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::SetDescription (const GS::UniString &description) |
Sets the description of the object. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::SetKeywords (const GS::UniString &keywords) |
Sets the keywords of the object. That is used by several search tools. Usually it is a comma separated list. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::SetParameters (const GDL::Parameters &newParamList, const std::vector< GS::UniString > &descriptions) |
Sets the parameters of the object. This function will replace the entire parameter list. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::MergeParameters (const GDL::Parameters &newParamList, const std::vector< GS::UniString > &descriptions) |
Merges new parameters to the object. This function will add new parameters and replace the existing ones. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::SetMasterScript (const GS::UniString &script) |
Sets the master script. This function will replace the existing master script. If it is empty, the script will NOT be deleted but set to empty. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::Set2DScript (const GS::UniString &script) |
Sets the 2D script. This function will replace the existing 2D script. If it is empty, the script will NOT be deleted but set to empty. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::Set3DScript (const GS::UniString &script) |
Sets the 3D script. This function will replace the existing 3D script. If it is empty, the script will NOT be deleted but set to empty. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::SetPropertiesScript (const GS::UniString &script) |
Sets the properties script. This function will replace the existing properties script. If it is empty, the script will NOT be deleted but set to empty. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::SetParameterScript (const GS::UniString &script) |
Sets the parameter script. This function will replace the existing parameter script. If it is empty, the script will NOT be deleted but set to empty. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::SetInterfaceScript (const GS::UniString &script) |
Sets the interface script. This function will replace the existing interface script. If it is empty, the script will NOT be deleted but set to empty. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::SetUIDefault (bool isDefault) |
Sets the interface as default. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::SetHierarchicalPagesUsed (bool hierarchicalPagesUsed) |
Sets the interface uses hierarchical pages. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::SetForwardMigrationScript (const GS::UniString &script) |
Sets the forward migration script. This function will replace the existing forward migration script. If it is empty, the script will NOT be deleted but set to empty. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::SetBackwardMigrationScript (const GS::UniString &script) |
Sets the backward migration script. This function will replace the existing backward migration script. If it is empty, the script will NOT be deleted but set to empty. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::Set2DVectorImage (const VectorImage &image) |
Sets a vector image as 2D symbol. This function will replace the existing 2D symbol. If it is empty, the symbol will NOT be deleted but set to empty. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::SetPreviewPicture (const GX::ImageRef &image) |
Sets the preview picture. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::SetGDLPictures (const std::vector< GX::ImageRef > &images) |
Sets the pictures which are referred from th GDL scripts. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::SetCustomSection (uint32_t sectionTypeID, uint16_t index, const GSMSectionData &data) |
Sets a custom section. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::DeleteMasterScript () |
Deletes the master script. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::Delete2DScript () |
Deletes the 2D script. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::Delete3DScript () |
Deletes the 3D script. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::DeletePropertiesScript () |
Deletes the properties script. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::DeleteParameterScript () |
Deletes the parameter script. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::DeleteInterfaceScript () |
Deletes the interface script. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::DeleteForwardMigrationScript () |
Deletes the forward migration script. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::DeleteBackwardMigrationScript () |
Deletes the backward migration script. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::Delete2DVectorImage () |
Deletes the 2D Vector image. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::DeletePreviewPicture () |
Deletes the preview picture. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::DeleteGDLPictures () |
Deletes GDL pictures. | |
ACAPI::Result< void > | ACAPI::Library::v1::GSMObject::DeleteCustomSection (uint32_t sectionID, uint16_t index=0) |
Deletes a custom section. | |
ACAPI::Result< GS::UniString > | ACAPI::Library::v1::LibPart::GetName () const |
The name of the library part. | |
ACAPI::Result< IO::Location > | ACAPI::Library::v1::LibPart::GetLocation () const |
The location of the library part file. | |
ACAPI::Result< LibPartType > | ACAPI::Library::v1::LibPart::GetType () const |
The file type of the library part. | |
ACAPI::Result< GS::UniString > | ACAPI::Library::v1::Library::GetName () const |
The name of the library. | |
ACAPI::Result< IO::Location > | ACAPI::Library::v1::Library::GetLocation () const |
Location of the Library. If the library is a teamwork library, the location is the local cache location. | |
ACAPI::Result< GS::UniString > | ACAPI::Library::v1::Library::GetTWServerUrl () const |
The teamwork server URL is the URL of the BIMcloud where the library is located, like "http://example.com". | |
ACAPI::Result< GS::UniString > | ACAPI::Library::v1::Library::GetTWServerPath () const |
The relative location of the library from the root of the BIMcloud server, like "Libraries/The shared library.lcf". | |
ACAPI::Result< bool > | ACAPI::Library::v1::Library::IsLocal () const |
The library is loaded from local (or netwrork) file system. | |
ACAPI::Result< bool > | ACAPI::Library::v1::Library::IsBuiltIn () const |
The library is built-in, if it is the Archicad's or any add-ons built-in library. | |
ACAPI::Result< bool > | ACAPI::Library::v1::Library::IsEmbedded () const |
The library is embedded, if it is the one embedded in the plan file. | |
ACAPI::Result< bool > | ACAPI::Library::v1::Library::IsServer () const |
The library is a server library, if it is loaded from a BIMcloud server. | |
ACAPI::Result< bool > | ACAPI::Library::v1::Library::IsPackage () const |
The library is a library package, if it is a .libpack file. | |
ACAPI::Result< GS::Guid > | ACAPI::Library::v1::Library::GetPackageID () const |
The package ID of the library package. | |
ACAPI::Result< UInt32 > | ACAPI::Library::v1::Library::GetPackageMainVersion () const |
The main version of the library package. Different main versions are incompatible and have different package IDs. | |
ACAPI::Result< UInt32 > | ACAPI::Library::v1::Library::GetPackageSubVersion () const |
The sub version of the library package. | |
ACAPI::Result< UInt32 > | ACAPI::Library::v1::Library::GetPackageMinACVersion () const |
The minimum Archicad version of the library package. | |
ACAPI::Result< UInt32 > | ACAPI::Library::v1::Library::GetPackageMinACBuildNumber () const |
The minimum Archicad build number of the library package. | |
ACAPI::Result< std::vector< std::tuple< GS::UniString, GS::Guid, UInt32 > > > | ACAPI::Library::v1::Library::GetPackageDependencies () const |
The dependencies of the library package. The dependencies are a list of name, package ID, subversion tuple. | |
Result< void > | ACAPI::Library::v1::LibraryManager::ModifyLibraryList (const std::function< GSErrCode(Modifier &)> &modifierFunc) |
Executed the passed modifier scope in a NotUndoable command. | |
std::vector< Library > | ACAPI::Library::v1::LibraryManager::FindLibraries (const std::function< bool(const Library &)> &selector) const |
Find Libraries using a custom selector function. | |
Result< Library > | ACAPI::Library::v1::LibraryManager::FindLibrary (const std::function< bool(const Library &)> &selector) const |
Find Library using a custom selector function. | |
Result< Library > | ACAPI::Library::v1::LibraryManager::GetLibraryByName (const GS::UniString &name) const |
Returns the Library with the given name. | |
Result< Library > | ACAPI::Library::v1::LibraryManager::GetEmbeddedLibrary () const |
A faster way to get the embedded library. | |
Result< Library > | ACAPI::Library::v1::LibraryManager::GetLibraryOfLibPart (const LibPart &libPart) const |
Returns the Library containing the Library Part. | |
std::vector< LibPart > | ACAPI::Library::v1::LibraryManager::FindLibParts (const std::function< bool(const LibPart &)> &selector) const |
Find LibParts using a custom selector function. | |
Result< LibPart > | ACAPI::Library::v1::LibraryManager::FindLibPart (const std::function< bool(const LibPart &)> &selector) const |
Find Library Part using a custom selector function. | |
Result< LibPart > | ACAPI::Library::v1::LibraryManager::GetLibPartByName (const GS::UniString &name) const |
Returns a library part with the filename. | |
Result< LibPart > | ACAPI::Library::v1::LibraryManager::GetLibPartByGSMObject (const GSMObject &gsmObject) const |
Returns the Library Part of the GSMObject. | |
Result< LibraryTreePath > | ACAPI::Library::v1::LibraryManager::GetLibraryTreePathOfLibPart (const LibPart &libPart) const |
Returns the LibraryTreePath of the LibPart. | |
Result< GS::Guid > | ACAPI::Library::v1::LibraryManager::GetTWID (const LibraryTreePath &libraryTreePath) const |
Returns the Teamwork Identifier of the Library Tree location. | |
Result< GSMObject > | ACAPI::Library::v1::LibraryManager::GetGSMObjectOfLibPart (const LibPart &libPart) const |
Returns the .gsm object representation of the Library Part. | |
Result< GSMObject > | ACAPI::Library::v1::LibraryManager::LoadGSMObjectFromFile (const IO::Location &location) const |
Loads a .gsm object from a file. | |
Result< LibPart > | ACAPI::Library::v1::LibraryManager::GetLibPartByLibInd (Int32 libPartIndex) const |
Returns a library part with the given index. | |
Result< Int32 > | ACAPI::Library::v1::LibraryManager::GetLibIndOfLibPart (const LibPart &libPart) const |
Returns the index of the library part. | |
Result< LibraryManager > | ACAPI::Library::v1::GetLibraryManager () |
Creates a LibraryManager instance. | |
Result< void > | ACAPI::Library::v1::LibraryManager::AddLibrary (const IO::Location &libraryPath) |
Add a libary to the actual library list. | |
Result< void > | ACAPI::Library::v1::LibraryManager::AddLibrary (const GS::UniString &twServerURL, const GS::UniString &twServerPath) |
Add a server libary to the actual library list. | |
Result< void > | ACAPI::Library::v1::LibraryManager::RemoveLibrary (const Library &library) |
Remove a libary from the actual library list. Embedded and Built-In libraries cannot be removed. | |
bool | ACAPI::Library::v1::SelectAllLibraries (const Library &) |
A selector for the FindLibraries function. It selects all libraries. | |
bool | ACAPI::Library::v1::SelectLoadedLibraries (const Library &lib) |
A selector for the FindLibraries function. It selects all libraries which are not embedded and not built-in. | |
bool | ACAPI::Library::v1::SelectAllLibParts (const LibPart &) |
A selector for the FindLibParts function. It selects all libparts. | |
bool | ACAPI::Library::v1::SelectObjectLibParts (const LibPart &lp) |
A selector for the FindLibParts function. It selects all object libparts. | |
bool | ACAPI::Library::v1::SelectTextLibParts (const LibPart &lp) |
A selector for the FindLibParts function. It selects all text libparts. | |
bool | ACAPI::Library::v1::SelectImageLibParts (const LibPart &lp) |
A selector for the FindLibParts function. It selects all image libparts. | |
bool | ACAPI::Library::v1::LibraryTreePath::IsRoot () const |
Root path of the library tree. | |
GS::UniString | ACAPI::Library::v1::LibraryTreePath::GetLastPart () const |
The name of the current node. | |
LibraryTreePath | ACAPI::Library::v1::LibraryTreePath::GetParent () const |
The parent of the represented node. | |
std::vector< GS::UniString > | ACAPI::Library::v1::LibraryTreePath::GetParts () const |
The parts of the path. | |
GSErrCode | ACAPI_ProjectOperation_ReloadLibraries () |
Resets and loads the active libraries. | |
GSErrCode | ACAPI_LibraryManagement_OpenLibraryPart (const API_OpenLibPartInfo *libPartToOpen) |
Opens the given library part in the Library Part Editor window. | |
GSErrCode | ACAPI_LibraryManagement_GetLibraries (GS::Array< API_LibraryInfo > *activeLibs, Int32 *embeddedLibraryIndex=nullptr) |
Returns the list of loaded libraries. | |
GSErrCode | ACAPI_LibraryManagement_SetLibraries (const GS::Array< API_LibraryInfo > *activeLibs) |
Changes the list of loaded libraries. | |
GSErrCode | ACAPI_LibraryManagement_NewLibDial (char *defName, IO::Location *newLib) |
Instructs the user to select a new library folder in a dialog. | |
GSErrCode | ACAPI_LibraryManagement_AddLibraries (IO::Location *newLib) |
Registers a new folder into the list of active libraries. | |
GSErrCode | ACAPI_LibraryManagement_CheckLibraries () |
Checks the currently loaded libraries. | |
GSErrCode | ACAPI_LibraryManagement_OverwriteLibPart (bool overwriteOn) |
Sets the overwrite mode for the library part create function. | |
GSErrCode | ACAPI_LibraryManagement_DeleteEmbeddedLibItem (const IO::Location *location, bool keepGSMFile=false, bool silentMode=false) |
Deletes the given embedded library item (folder or library part). | |
GSErrCode | ACAPI_LibraryManagement_DeleteEmbeddedLibItems (const GS::Array< IO::Location > *location, bool keepGSMFile=false, bool silentMode=false) |
Delete embeded lib items. | |
GSErrCode | ACAPI_LibraryManagement_CreateFolderInLibrary (const IO::Location *newFolderLocationInLibrary) |
Creates a new folder inside a loaded library. | |
GSErrCode | ACAPI_LibraryManagement_CopyFilesIntoLibrary (const IO::Location *targetFolderLocationInLibrary, const GS::Array< IO::Location > *filesToCopy, const bool *overwriteIfExists) |
Copies files into a folder inside a loaded library. | |
GSErrCode | ACAPI_LibraryManagement_GetGDLDate (Int32 *date) |
Returns GDL environment date information (GDL_PROJECT_DATE). | |
GSErrCode | ACAPI_LibraryManagement_ChangeGDLDate (Int32 *date) |
Changes GDL environment date (GDL_PROJECT_DATE). | |
GSErrCode | ACAPI_LibraryManagement_CreateCopyOfGdlUserGlobalsHandle (GDL::Parameters **userGlobals) |
Returns a copy of the current GDL globals. | |
GSErrCode | ACAPI_LibraryManagement_DestroyCopyOfGdlUserGlobalsHandle (GDL::Parameters **userGlobals) |
Destroys the previously copied GDL globals handle. | |
GSErrCode | ACAPI_LibraryManagement_GetLibPartOrigLocation (const Int32 *libItemIndex, IO::Location *origLocation) |
Returns the original location of a library part. | |
GSErrCode | ACAPI_LibraryManagement_UsableGDLString (const char *str) |
Determines whether the string is a GDL keyword or reserved symbol. | |
GSErrCode | ACAPI_LibraryManagement_RunGDLParScript (const API_Elem_Head *elemHead, UInt32 mask=0) |
Run GDL parameter script. | |
GSErrCode | ACAPI_LibraryManagement_InterpretGDLScript3D (const GS::UniString *script, API_AddParType **addPars, void *modelerAPIModel=nullptr, void *modelerModel=nullptr) |
Interprets a 3D GDL script with the same settings as GDL Editor. | |
GSErrCode | ACAPI_LibraryPart_RegisterSubtype (GSType signature, short templateFileResID, bool transparentNode, short stringResID, short smallIconResID, short largeIconResID, API_TBoxGroup toolGroupId, API_TBoxEnabled enableFlags, short defaultsResID) |
Registers a new library part subtype. | |
GSErrCode | ACAPI_Element_GetDescriptors (const API_Elem_Head *elemHead, API_DescriptorRefType ***descRef, Int32 *nDesc) |
Returns the descriptors of an element. | |
Variables | |
int16_t | ACAPI::Library::v1::GSMSectionData::dataVersion |
Version of the data format. | |
std::vector< std::byte > | ACAPI::Library::v1::GSMSectionData::data |
Raw bites of the stored data. | |
Functions to load, iterate and manipulate libraries and library parts.
Classes and functions related to library management allow add-ons to access and modify loaded libraries and library parts in the planfile, similar to how users interact with the UI. The basic concepts are similar to those known from UI: ACAPI::Library::v1::LibraryManager, ACAPI::Library::v1::Library, ACAPI::Library::v1::LibPart, ACAPI::Library::v1::GSMObject. Starting with Archicad 28, GSM file-specific operations have been separated from general library part management to more logically align with how Archicad operates. ACAPI::Library::v1::LibraryTreePath is an additional concept that helps map the library structure and provides access to Teamwork functions.
All classes and functions can be found in the ACAPI/Library/*.hpp
header files and in the ACAPI::Library
namespace.
For working examples, check the LibraryManagement_Test_ExampleFunctions.cpp
file from the API DevKit.
The ACAPI::Library::v1::LibraryManager class is the main entry point for library-related functionalities. This class is not a one-to-one equivalent of the familiar UI dialogue, but it provides the same functionalities.
While it doesn't store data itself, it provides access to the data in the plan file. It can be instantiated anywhere the plan file already exists, and this instantiation is a low-cost operation. However, instance creation can fail, as we can't guarantee that a plan file is loaded in every context. That is why the creation is packaged in a factory:
In a safe context, where the plan file definitely exists, you can instantiate it in a more compact way:
Library and Library Part can be searched and queried using the methods of the created LibraryManager instance. You can search and filter with unary predicates, similar to the find_if
function from the C++ standard library. We provide reusable predicates for the most common searches.
If you are looking for a specific instance, the result will be of type ACAPI::Result, as the hit is not guaranteed. The LibraryManager also provide a quick solution for common queries.
The modifications can be accessed within a modification scope. This allows multiple modifications to be executed at once, in one step, just like the operation of the Library Manager dialog box. Opening the scope also checks the modification rights, and returns an error if the given user does not reserve the library list in Teamwork.
See more examples in LibraryManagement_Test_ExampleFunctions.cpp
.
Similar to the Archicad UI concept, the API also separates the functionalities of the Library Parts from those that are specific to GSM files. A Library Part is anything that is part of a loaded library. However, a GSM can also be a local file that is not a loaded Library Part, but was read from outside.
Be aware that loading the same object from a file and from a libpart can result different behaviors. If you are interested in the state that also appears in the plan file, always create a GSMObject from a LibPart. You should load GSM from a file only when you would access its raw content. If the object comes from a .libpack library, it means, it is not translated.
You cannot directly create or modify a GSM file in a loaded library. You need an object loaded from an external file, which can optionally be copied into the library after editing.
The modification methods are available from a modification scope. This ensures that modification methods are available for objects loaded from file, and all of the modification calls will perform in an atomic step.
See more detailed examples in LibraryManagement_Test_ExampleFunctions.cpp
.
Copying an external file back into an editable loaded library works in the old, traditional way. Of course, copying multiple files here also happens in one step.
A reservable component can be reserved, released or its status can be queried using with ACAPI_Teamwork_*
functions. Full documentation can be found here: Teamwork
The ACAPI::Library::LibraryManager
can represent a point in the library tree with the ACAPI::Library::LibraryTreePath
type. With this, we can get the reservable object identifier, which can be used to call the ACAPI_Teamwork_*
functions.
For reserving the library list you don't need to use the LibraryManager instance:
enum API_LibraryTypeID |
Project library types.
libraryType
data member in the API_LibraryInfo structure defines the type of the project library, which can be
|
strong |
Control flags for the copy of the GSM objects.
GenerateNewUnID: The new object gets different UnID; KeepMainGuid: Creates a new revision.
|
strong |
File type of a library part.
Values can be: Object, Image, Text, BinaryListCrit, Other
GSErrCode ACAPI_Element_GetDescriptors | ( | const API_Elem_Head * | elemHead, |
API_DescriptorRefType *** | descRef, | ||
Int32 * | nDesc | ||
) |
Returns the descriptors of an element.
elemHead | [in] The element you want to get the descriptors for. |
descRef | [out] List of the descriptors. |
nDesc | [out] Number of the descriptors in the list. |
GSErrCode ACAPI_LibraryManagement_AddLibraries | ( | IO::Location * | newLib | ) |
Registers a new folder into the list of active libraries.
newLib | [in] The file system location of the folder to add. |
GSErrCode ACAPI_LibraryManagement_ChangeGDLDate | ( | Int32 * | date | ) |
Changes GDL environment date (GDL_PROJECT_DATE).
date | [in] The new GDL environment date. It must be an Int32 array with 6 size. |
Date component | Meaning |
---|---|
date[0] | Year |
date[1] | Month |
date[2] | Day |
date[3] | Hour |
date[4] | Minute |
date[5] | Second |
GSErrCode ACAPI_LibraryManagement_CheckLibraries | ( | ) |
Checks the currently loaded libraries.
GSErrCode ACAPI_LibraryManagement_CopyFilesIntoLibrary | ( | const IO::Location * | targetFolderLocationInLibrary, |
const GS::Array< IO::Location > * | filesToCopy, | ||
const bool * | overwriteIfExists | ||
) |
Copies files into a folder inside a loaded library.
targetFolderLocationInLibrary | [in] The target folder location. |
filesToCopy | [in] The list of files to be copied. |
overwriteIfExists | [in] Overwrite existing files found on the target location (optional parameter; if omitted, the value is considered false, resulting existing files to be skipped). |
GSErrCode ACAPI_LibraryManagement_CreateCopyOfGdlUserGlobalsHandle | ( | GDL::Parameters ** | userGlobals | ) |
Returns a copy of the current GDL globals.
userGlobals | [out] The object containing the GDL globals required by the GDL interpreter. |
GSErrCode ACAPI_LibraryManagement_CreateFolderInLibrary | ( | const IO::Location * | newFolderLocationInLibrary | ) |
Creates a new folder inside a loaded library.
newFolderLocationInLibrary | [in] The location of the folder to be created in an existing active library. |
GSErrCode ACAPI_LibraryManagement_DeleteEmbeddedLibItem | ( | const IO::Location * | location, |
bool | keepGSMFile = false , |
||
bool | silentMode = false |
||
) |
Deletes the given embedded library item (folder or library part).
location | [in] The location of the embedded library item. |
keepGSMFile | [in] If this parameter is true, then the operation deletes libpart only from the embedded library, but keeps the.gsm file in the filesystem. (optional parameter, by default it's false) |
silentMode | [in] If this parameter is true, then the missing libpart window won't open in case of any warning. (optional parameter, by default it's false) |
GSErrCode ACAPI_LibraryManagement_DeleteEmbeddedLibItems | ( | const GS::Array< IO::Location > * | location, |
bool | keepGSMFile = false , |
||
bool | silentMode = false |
||
) |
Delete embeded lib items.
location | [in] Array of locations of the library items. |
keepGSMFile | [in] Keep the GSM file. |
silentMode | [in] Missing library parts dialog window should pop up. |
GSErrCode ACAPI_LibraryManagement_DestroyCopyOfGdlUserGlobalsHandle | ( | GDL::Parameters ** | userGlobals | ) |
Destroys the previously copied GDL globals handle.
userGlobals | [in] The object containing the GDL globals required by the GDL interpreter. |
GSErrCode ACAPI_LibraryManagement_GetGDLDate | ( | Int32 * | date | ) |
Returns GDL environment date information (GDL_PROJECT_DATE).
date | [out] GDL environment date. It must be an Int32 array with 6 size. |
Date component | Meaning |
---|---|
date[0] | Year |
date[1] | Month |
date[2] | Day |
date[3] | Hour |
date[4] | Minute |
date[5] | Second |
GSErrCode ACAPI_LibraryManagement_GetLibPartOrigLocation | ( | const Int32 * | libItemIndex, |
IO::Location * | origLocation | ||
) |
Returns the original location of a library part.
libItemIndex | [in] The index of the library part. |
origLocation | [out] The location of the given library part. |
libItemIndex
or origLocation
is nullptr GSErrCode ACAPI_LibraryManagement_GetLibraries | ( | GS::Array< API_LibraryInfo > * | activeLibs, |
Int32 * | embeddedLibraryIndex = nullptr |
||
) |
Returns the list of loaded libraries.
activeLibs | the active library list |
embeddedLibraryIndex | [out] optional; the 0-based index of the embedded library in this list |
GSErrCode ACAPI_LibraryManagement_InterpretGDLScript3D | ( | const GS::UniString * | script, |
API_AddParType ** | addPars, | ||
void * | modelerAPIModel = nullptr , |
||
void * | modelerModel = nullptr |
||
) |
Interprets a 3D GDL script with the same settings as GDL Editor.
script | [in] The 3D GDL Script. |
addPars | [in] Parameters for script running. Can be NULL, in this case the script will run with empty parameter list. |
modelerAPIModel | [out] The generated 3D model as ModelerAPI::Model. Use either this or the modelerModel, but only one at the same time. |
modelerModel | [out] The generated 3D model as Modeler::ConstModel3DPtr. Use either this or the modelerAPIModel, but only one at the same time. |
GSErrCode ACAPI_LibraryManagement_NewLibDial | ( | char * | defName, |
IO::Location * | newLib | ||
) |
Instructs the user to select a new library folder in a dialog.
defName | [in] A pointer to the default name of the new library. |
newLib | [out] The file system location of the selected folder. |
DG::FolderDialog
of the Dialog Manager instead of calling ACAPI_LibraryManagement_NewLibDial. GSErrCode ACAPI_LibraryManagement_OpenLibraryPart | ( | const API_OpenLibPartInfo * | libPartToOpen | ) |
Opens the given library part in the Library Part Editor window.
libPartToOpen | [in] Identifies the library part to open. |
GSErrCode ACAPI_LibraryManagement_OverwriteLibPart | ( | bool | overwriteOn | ) |
Sets the overwrite mode for the library part create function.
overwriteOn | [in] Switch ON or OFF the overwrite mode. |
GSErrCode ACAPI_LibraryManagement_RunGDLParScript | ( | const API_Elem_Head * | elemHead, |
UInt32 | mask = 0 |
||
) |
Run GDL parameter script.
elemHead | [in] Head of the element. It is identified by the guid field. |
mask | Element mask; can be APIElemMask_FromFloorplan (= use the element from the floor plan). |
GSErrCode ACAPI_LibraryManagement_SetLibraries | ( | const GS::Array< API_LibraryInfo > * | activeLibs | ) |
Changes the list of loaded libraries.
activeLibs | the active library list to set |
GSErrCode ACAPI_LibraryManagement_UsableGDLString | ( | const char * | str | ) |
Determines whether the string is a GDL keyword or reserved symbol.
str | [in] a string to check as a GDL keyword or reserved symbol |
GSErrCode ACAPI_LibraryPart_RegisterSubtype | ( | GSType | signature, |
short | templateFileResID, | ||
bool | transparentNode, | ||
short | stringResID, | ||
short | smallIconResID, | ||
short | largeIconResID, | ||
API_TBoxGroup | toolGroupId, | ||
API_TBoxEnabled | enableFlags, | ||
short | defaultsResID | ||
) |
Registers a new library part subtype.
signature | [in] A four-character identifier of this library part subtype |
templateFileResID | [in] 'FILE' resource ID of the subtype template library part compiled into the add-on |
transparentNode | [in] Objects of this subtype can be shown on higher ancestry levels as well |
stringResID | [in] Resource ID of the library part subtype description string |
smallIconResID | [in] Resource ID of the small-sized toolbox (toolbar) item icon |
largeIconResID | [in] Resource ID of the large-sized toolbox item icon |
toolGroupId | [in] Toolbox item position |
enableFlags | [in] Enable or disable the subtype tool depending on the active window |
defaultsResID | [in] ID of the 'ACP0' resource that contains the element default values for this subtype |
API_TBoxGroup | Meaning |
---|---|
TBoxGroup_Root | The subtype tool item will be appended to the group of model element tools |
TBoxGroup_Objects | The subtype tool item will be added to the object tools |
TBoxGroup_Openings | The subtype tool item will be added to the window/door tools |
You can control the availability of the subtype tool in the toolbox by setting the enableFlags
bits:
API_TBoxEnabled | The subtype tool is enabled |
---|---|
API_TBoxEnabled_FloorPlan | on floor plan window |
API_TBoxEnabled_ModelSection | on model type section and elevation windows |
API_TBoxEnabled_DrawingSection | on drawing type section and elevation windows |
API_TBoxEnabled_3D | on 3D model window |
API_TBoxEnabled_Detail | on detail window |
API_TBoxEnabled_Layout | on layout and master layout windows |
API_TBoxEnabled_Worksheet | on worksheet window |
API_TBoxEnabled_ModelInteriorElevation | on model type interior elevation windows |
API_TBoxEnabled_DrawingInteriorElevation | on drawing type interior elevation windows |
If you want to register your subtype tool without appearing in the toolbox, pass 0 for both the smallIconResID
and the largeIconResID
parameters. If you register a subtype tool you should define the factory default values for this element type in an 'ACP0' resource. The element default will be initialized with these parameters when no preferences data is stored. The structure of this resource is shown at the example below. The resource ID should be passed in the defaultsResID parameter. Learn more about this topic at the general description of Library Part Subtypes.
GSErrCode ACAPI_ProjectOperation_ReloadLibraries | ( | ) |
Resets and loads the active libraries.
Result< void > ACAPI::Library::v1::LibraryManager::AddLibrary | ( | const GS::UniString & | twServerURL, |
const GS::UniString & | twServerPath | ||
) |
Add a server libary to the actual library list.
twServerURL | The teamwork server URL. |
twServerPath | Relative location of the library from the root of the BIM Server. |
Result< void > ACAPI::Library::v1::LibraryManager::AddLibrary | ( | const IO::Location & | libraryPath | ) |
Add a libary to the actual library list.
libraryPath | Reference of library location. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::CopyTo | ( | const IO::Location & | fileLocation, |
CopyMethod | method = CopyMethod::KeepMainGuid |
||
) |
Creates a new copy from the GSM file to a location.
fileLocation | The path of the new GSM file. It should be a non-existing gsm file in an existing folder. |
method | KeepMainGuid: Creates a new revision; GenerateNewUnID: The new object gets different UnID. |
|
static |
Creates a new empty GSM Object.
fileLocation | The path of the new GSM file. It should be a non-existing gsm file in an existing folder. |
ancestorSubType | The ancestor subtype of the new object. It should be a valid and loaded subtype object. The new object will inherit the parameters of the ancestor subtype. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::Delete2DScript | ( | ) |
Deletes the 2D script.
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::Delete2DVectorImage | ( | ) |
Deletes the 2D Vector image.
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::Delete3DScript | ( | ) |
Deletes the 3D script.
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::DeleteBackwardMigrationScript | ( | ) |
Deletes the backward migration script.
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::DeleteCustomSection | ( | uint32_t | sectionID, |
uint16_t | index = 0 |
||
) |
Deletes a custom section.
sectionID | A four-byte identifier of the custom section. Like 'sect'. |
index | The index of the custom sections with similar type ID. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::DeleteForwardMigrationScript | ( | ) |
Deletes the forward migration script.
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::DeleteGDLPictures | ( | ) |
Deletes GDL pictures.
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::DeleteInterfaceScript | ( | ) |
Deletes the interface script.
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::DeleteMasterScript | ( | ) |
Deletes the master script.
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::DeleteParameterScript | ( | ) |
Deletes the parameter script.
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::DeletePreviewPicture | ( | ) |
Deletes the preview picture.
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::DeletePropertiesScript | ( | ) |
Deletes the properties script.
std::vector< LibPart > ACAPI::Library::v1::LibraryManager::FindLibParts | ( | const std::function< bool(const LibPart &)> & | selector | ) | const |
Find LibParts using a custom selector function.
selector | Reference of the selector function. |
std::vector< Library > ACAPI::Library::v1::LibraryManager::FindLibraries | ( | const std::function< bool(const Library &)> & | selector | ) | const |
Find Libraries using a custom selector function.
selector | Reference of the selector function. |
ACAPI::Result< GS::UniString > ACAPI::Library::v1::GSMObject::Get2DScript | ( | const GS::UniString & | password = GS::EmptyUniString | ) | const |
2D script of the object.
password | Optional parameter. Required if the object is password protected |
ACAPI::Result< VectorImage > ACAPI::Library::v1::GSMObject::Get2DVectorImage | ( | ) | const |
2D Vector Image of the object.
ACAPI::Result< GS::UniString > ACAPI::Library::v1::GSMObject::Get3DScript | ( | const GS::UniString & | password = GS::EmptyUniString | ) | const |
3D script of the object.
password | Optional parameter. Required if the object is password protected |
ACAPI::Result< GS::UniString > ACAPI::Library::v1::GSMObject::GetAuthor | ( | ) | const |
Author of the object.
ACAPI::Result< GS::UniString > ACAPI::Library::v1::GSMObject::GetBackwardMigrationScript | ( | const GS::UniString & | password = GS::EmptyUniString | ) | const |
Backward Migration script of the object.
password | Optional parameter. Required if the object is password protected |
ACAPI::Result< GSMSectionData > ACAPI::Library::v1::GSMObject::GetCustomSection | ( | uint32_t | sectionID, |
uint16_t | index = 0 |
||
) | const |
Custom section data of the object.
sectionID | The identifier of the custom section. |
index | The index of the section data if there are stored more than one |
ACAPI::Result< GS::UniString > ACAPI::Library::v1::GSMObject::GetDescription | ( | ) | const |
Description of the object.
A faster way to get the embedded library.
ACAPI::Result< GS::UniString > ACAPI::Library::v1::GSMObject::GetForwardMigrationScript | ( | const GS::UniString & | password = GS::EmptyUniString | ) | const |
Forward Migration script of the object.
password | Optional parameter. Required if the object is password protected |
ACAPI::Result< std::vector< GX::ImageRef > > ACAPI::Library::v1::GSMObject::GetGDLPictures | ( | ) | const |
Embedded pictures of the object.
Result< GSMObject > ACAPI::Library::v1::LibraryManager::GetGSMObjectOfLibPart | ( | const LibPart & | libPart | ) | const |
Returns the .gsm object representation of the Library Part.
libPart | Reference of the library part. |
ACAPI::Result< GS::UniString > ACAPI::Library::v1::GSMObject::GetInterfaceScript | ( | const GS::UniString & | password = GS::EmptyUniString | ) | const |
Interface script of the object.
password | Optional parameter. Required if the object is password protected |
ACAPI::Result< GS::UniString > ACAPI::Library::v1::GSMObject::GetKeywords | ( | ) | const |
Keywords of the object. Mostly used for search. Usually it is a comma separated list.
GS::UniString ACAPI::Library::v1::LibraryTreePath::GetLastPart | ( | ) | const |
The name of the current node.
Result< Int32 > ACAPI::Library::v1::LibraryManager::GetLibIndOfLibPart | ( | const LibPart & | libPart | ) | const |
Returns the index of the library part.
libPart | Reference of the library part. |
Result< LibPart > ACAPI::Library::v1::LibraryManager::GetLibPartByGSMObject | ( | const GSMObject & | gsmObject | ) | const |
Result< LibPart > ACAPI::Library::v1::LibraryManager::GetLibPartByLibInd | ( | Int32 | libPartIndex | ) | const |
Returns a library part with the given index.
libPartIndex | Index of the library part. |
Result< LibPart > ACAPI::Library::v1::LibraryManager::GetLibPartByName | ( | const GS::UniString & | name | ) | const |
Returns a library part with the filename.
name | The name of the libpart with file extension. |
|
inline |
Creates a LibraryManager instance.
Result< Library > ACAPI::Library::v1::LibraryManager::GetLibraryOfLibPart | ( | const LibPart & | libPart | ) | const |
Returns the Library containing the Library Part.
libPart | Reference of the library part. |
Result< LibraryTreePath > ACAPI::Library::v1::LibraryManager::GetLibraryTreePathOfLibPart | ( | const LibPart & | libPart | ) | const |
Returns the LibraryTreePath of the LibPart.
libPart | Reference of the LibPart. |
ACAPI::Result< GS::UniString > ACAPI::Library::v1::GSMObject::GetLicense | ( | ) | const |
License name of the object.
ACAPI::Result< GS::UniString > ACAPI::Library::v1::GSMObject::GetLicenseVersion | ( | ) | const |
License version of the object.
ACAPI::Result< IO::Location > ACAPI::Library::v1::LibPart::GetLocation | ( | ) | const |
The location of the library part file.
ACAPI::Result< IO::Location > ACAPI::Library::v1::Library::GetLocation | ( | ) | const |
ACAPI::Result< GS::UniString > ACAPI::Library::v1::GSMObject::GetMasterScript | ( | const GS::UniString & | password = GS::EmptyUniString | ) | const |
Master script of the object.
password | Optional parameter. Required if the object is password protected |
ACAPI::Result< GS::UniString > ACAPI::Library::v1::LibPart::GetName | ( | ) | const |
The name of the library part.
The name is the (localized) name of the library part with file extension which is displayed in the Library Manager dialog.
ACAPI::Result< GS::UniString > ACAPI::Library::v1::Library::GetName | ( | ) | const |
ACAPI::Result< std::vector< std::tuple< GS::UniString, GS::Guid, UInt32 > > > ACAPI::Library::v1::Library::GetPackageDependencies | ( | ) | const |
The dependencies of the library package. The dependencies are a list of name, package ID, subversion tuple.
ACAPI::Result< GS::Guid > ACAPI::Library::v1::Library::GetPackageID | ( | ) | const |
The package ID of the library package.
ACAPI::Result< UInt32 > ACAPI::Library::v1::Library::GetPackageMainVersion | ( | ) | const |
The main version of the library package. Different main versions are incompatible and have different package IDs.
ACAPI::Result< UInt32 > ACAPI::Library::v1::Library::GetPackageMinACBuildNumber | ( | ) | const |
The minimum Archicad build number of the library package.
ACAPI::Result< UInt32 > ACAPI::Library::v1::Library::GetPackageMinACVersion | ( | ) | const |
The minimum Archicad version of the library package.
ACAPI::Result< UInt32 > ACAPI::Library::v1::Library::GetPackageSubVersion | ( | ) | const |
The sub version of the library package.
ACAPI::Result< std::vector< GS::UniString > > ACAPI::Library::v1::GSMObject::GetParameterDescriptions | ( | ) | const |
Parameter descriptions of the object.
ACAPI::Result< GDL::Parameters > ACAPI::Library::v1::GSMObject::GetParameters | ( | ) | const |
Parameter list of the object.
ACAPI::Result< GS::UniString > ACAPI::Library::v1::GSMObject::GetParameterScript | ( | const GS::UniString & | password = GS::EmptyUniString | ) | const |
Parameter script of the object.
password | Optional parameter. Required if the object is password protected |
LibraryTreePath ACAPI::Library::v1::LibraryTreePath::GetParent | ( | ) | const |
The parent of the represented node.
std::vector< GS::UniString > ACAPI::Library::v1::LibraryTreePath::GetParts | ( | ) | const |
The parts of the path.
ACAPI::Result< GX::ImageRef > ACAPI::Library::v1::GSMObject::GetPreviewPicture | ( | ) | const |
Preview picture of the object.
ACAPI::Result< GS::UniString > ACAPI::Library::v1::GSMObject::GetPropertiesScript | ( | const GS::UniString & | password = GS::EmptyUniString | ) | const |
Properties script of the object.
password | Optional parameter. Required if the object is password protected |
ACAPI::Result< GS::UnID > ACAPI::Library::v1::GSMObject::GetSubTypeUnID | ( | ) | const |
The UnID of the object's direct ancestor in the subtype hierarchy.
Result< GS::Guid > ACAPI::Library::v1::LibraryManager::GetTWID | ( | const LibraryTreePath & | libraryTreePath | ) | const |
Returns the Teamwork Identifier of the Library Tree location.
libraryTreePath | Library Tree location. |
ACAPI::Result< GS::UniString > ACAPI::Library::v1::Library::GetTWServerPath | ( | ) | const |
The relative location of the library from the root of the BIMcloud server, like "Libraries/The shared library.lcf".
ACAPI::Result< GS::UniString > ACAPI::Library::v1::Library::GetTWServerUrl | ( | ) | const |
The teamwork server URL is the URL of the BIMcloud where the library is located, like "http://example.com".
ACAPI::Result< LibPartType > ACAPI::Library::v1::LibPart::GetType | ( | ) | const |
The file type of the library part.
ACAPI::Result< GS::UnID > ACAPI::Library::v1::GSMObject::GetUnID | ( | ) | const |
The UnID is a combination of the main guid and the revision guid.
bool ACAPI::Library::v1::GSMObject::Has2DScript | ( | ) | const |
Checks whether 2DScript section has value or is empty.
bool ACAPI::Library::v1::GSMObject::Has2DVectorImage | ( | ) | const |
Checks whether 2DVectorImage section has value or is empty.
bool ACAPI::Library::v1::GSMObject::Has3DScript | ( | ) | const |
Checks whether 3DScript section has value or is empty.
bool ACAPI::Library::v1::GSMObject::HasBackwardMigrationScript | ( | ) | const |
Checks whether BackwardMigrationScript section has value or is empty.
bool ACAPI::Library::v1::GSMObject::HasCustomSection | ( | uint32_t | sectionTypeID, |
uint16_t | index | ||
) | const |
Checks whether CustomSection has value or is empty.
sectionTypeID | A four-byte identifier of the custom section. Like 'sect'. |
index | The index of the custom sections with similar type ID. |
bool ACAPI::Library::v1::GSMObject::HasForwardMigrationScript | ( | ) | const |
Checks whether ForwardMigrationScript section has value or is empty.
bool ACAPI::Library::v1::GSMObject::HasGDLPictures | ( | ) | const |
Checks whether GDLPictures section has value or is empty.
bool ACAPI::Library::v1::GSMObject::HasInterfaceScript | ( | ) | const |
Checks whether InterfaceScript section has value or is empty.
bool ACAPI::Library::v1::GSMObject::HasMasterScript | ( | ) | const |
Checks whether MasterScript has value or is empty.
bool ACAPI::Library::v1::GSMObject::HasParameterScript | ( | ) | const |
Checks whether ParameterScript section has value or is empty.
bool ACAPI::Library::v1::GSMObject::HasPreviewPicture | ( | ) | const |
Checks whether PreviewPicture section has value or is empty.
bool ACAPI::Library::v1::GSMObject::HasPropertiesScript | ( | ) | const |
Checks whether PropertiesScript section has value or is empty.
ACAPI::Result< bool > ACAPI::Library::v1::Library::IsBuiltIn | ( | ) | const |
The library is built-in, if it is the Archicad's or any add-ons built-in library.
bool ACAPI::Library::v1::GSMObject::IsEditable | ( | ) | const |
A GSM file is editable if it is loaded from the local file system. GSM files from Loaded Libraries should be copied into a local directory before editing.
ACAPI::Result< bool > ACAPI::Library::v1::Library::IsEmbedded | ( | ) | const |
The library is embedded, if it is the one embedded in the plan file.
ACAPI::Result< bool > ACAPI::Library::v1::GSMObject::IsHierarchicalPagesUsed | ( | ) | const |
The defined interface uses hierarchical pages.
ACAPI::Result< bool > ACAPI::Library::v1::GSMObject::IsInSubTypeOf | ( | const GS::UnID & | subTypeID | ) | const |
The object is a subtype of the given UnID.
subTypeID | The id of the sub type. |
ACAPI::Result< bool > ACAPI::Library::v1::Library::IsLocal | ( | ) | const |
The library is loaded from local (or netwrork) file system.
ACAPI::Result< bool > ACAPI::Library::v1::Library::IsPackage | ( | ) | const |
The library is a library package, if it is a .libpack file.
ACAPI::Result< bool > ACAPI::Library::v1::GSMObject::IsPasswordProtected | ( | ) | const |
The object is password protected and encrypted.
ACAPI::Result< bool > ACAPI::Library::v1::GSMObject::IsPlaceable | ( | ) | const |
The object can be placed in a plan file.
bool ACAPI::Library::v1::LibraryTreePath::IsRoot | ( | ) | const |
Root path of the library tree.
ACAPI::Result< bool > ACAPI::Library::v1::Library::IsServer | ( | ) | const |
The library is a server library, if it is loaded from a BIMcloud server.
ACAPI::Result< bool > ACAPI::Library::v1::GSMObject::IsSubType | ( | ) | const |
The object is an 'object subtype'.
ACAPI::Result< bool > ACAPI::Library::v1::GSMObject::IsUIDefault | ( | ) | const |
The defined interface is set as default UI.
Result< GSMObject > ACAPI::Library::v1::LibraryManager::LoadGSMObjectFromFile | ( | const IO::Location & | location | ) | const |
Loads a .gsm object from a file.
location | The file location. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::MergeParameters | ( | const GDL::Parameters & | newParamList, |
const std::vector< GS::UniString > & | descriptions | ||
) |
Merges new parameters to the object. This function will add new parameters and replace the existing ones.
newParamList | Parameter list with the new parameters. |
descriptions | The descriptions of the parameters stored in the newParamList parameter. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::Modify | ( | const std::function< GSErrCode(Modifier &)> & | modifierFunc, |
GS::UniString | password = GS::EmptyUniString |
||
) |
Opens a modification scope if the object is editable. See 'IsEditable'.
modifierFunc | The function which will be called with a 'Modifier' object. Through this object can be the GSMObject modified. |
password | If the GSMObject is password protected, the correct password must be given. Otherwise the modifier function will not be called. |
Result< void > ACAPI::Library::v1::LibraryManager::ModifyLibraryList | ( | const std::function< GSErrCode(Modifier &)> & | modifierFunc | ) |
Executed the passed modifier scope in a NotUndoable command.
modifierFunc | Reference of the ModifierFunc. |
Remove a libary from the actual library list. Embedded and Built-In libraries cannot be removed.
library | The library to be removed. |
|
inline |
A selector for the FindLibParts function. It selects all libparts.
|
inline |
A selector for the FindLibraries function. It selects all libraries.
|
inline |
A selector for the FindLibParts function. It selects all image libparts.
lp | Reference of the libpart. |
|
inline |
A selector for the FindLibraries function. It selects all libraries which are not embedded and not built-in.
lib | Reference of the library. |
|
inline |
A selector for the FindLibParts function. It selects all object libparts.
lp | Reference of the libpart. |
|
inline |
A selector for the FindLibParts function. It selects all text libparts.
lp | Reference of the libpart. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::Set2DScript | ( | const GS::UniString & | script | ) |
Sets the 2D script. This function will replace the existing 2D script. If it is empty, the script will NOT be deleted but set to empty.
script | A GDL script which will be set as the 2D script. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::Set2DVectorImage | ( | const VectorImage & | image | ) |
Sets a vector image as 2D symbol. This function will replace the existing 2D symbol. If it is empty, the symbol will NOT be deleted but set to empty.
image | A VectorImage object. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::Set3DScript | ( | const GS::UniString & | script | ) |
Sets the 3D script. This function will replace the existing 3D script. If it is empty, the script will NOT be deleted but set to empty.
script | A GDL script which will be set as the 3D script. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::SetAuthor | ( | const GS::UniString & | author | ) |
Sets the author of the object.
author | The new author value. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::SetBackwardMigrationScript | ( | const GS::UniString & | script | ) |
Sets the backward migration script. This function will replace the existing backward migration script. If it is empty, the script will NOT be deleted but set to empty.
script | A GDL script which will be set as the backward migration script. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::SetCustomSection | ( | uint32_t | sectionTypeID, |
uint16_t | index, | ||
const GSMSectionData & | data | ||
) |
Sets a custom section.
sectionTypeID | A four-byte identifier of the custom section. Like 'sect'. |
index | The index of the custom sections with similar type ID. |
data | The GSMSectionData which contains the binary serialized data. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::SetDescription | ( | const GS::UniString & | description | ) |
Sets the description of the object.
description | The new description. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::SetForwardMigrationScript | ( | const GS::UniString & | script | ) |
Sets the forward migration script. This function will replace the existing forward migration script. If it is empty, the script will NOT be deleted but set to empty.
script | A GDL script which will be set as the forward migration script. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::SetGDLPictures | ( | const std::vector< GX::ImageRef > & | images | ) |
Sets the pictures which are referred from th GDL scripts.
images | A vector of GX::ImageRef images. The most common image formats are supported. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::SetHierarchicalPagesUsed | ( | bool | hierarchicalPagesUsed | ) |
Sets the interface uses hierarchical pages.
hierarchicalPagesUsed | true if yes |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::SetInterfaceScript | ( | const GS::UniString & | script | ) |
Sets the interface script. This function will replace the existing interface script. If it is empty, the script will NOT be deleted but set to empty.
script | A GDL script which will be set as the interface script. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::SetIsSubtype | ( | bool | isSubType | ) |
Sets the object as a subtype.
isSubType | If true the object will be a subtype. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::SetKeywords | ( | const GS::UniString & | keywords | ) |
Sets the keywords of the object. That is used by several search tools. Usually it is a comma separated list.
keywords | The new keywords. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::SetLicense | ( | const GS::UniString & | license | ) |
Sets the license code of the object.
license | The new license code. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::SetLicenseVersion | ( | const GS::UniString & | licVer | ) |
Sets the license version of the object.
licVer | The new license version. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::SetMasterScript | ( | const GS::UniString & | script | ) |
Sets the master script. This function will replace the existing master script. If it is empty, the script will NOT be deleted but set to empty.
script | A GDL script which will be set as the master script. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::SetParameters | ( | const GDL::Parameters & | newParamList, |
const std::vector< GS::UniString > & | descriptions | ||
) |
Sets the parameters of the object. This function will replace the entire parameter list.
newParamList | The new parameter list. |
descriptions | The descriptions of the parameters stored in the newParamList parameter. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::SetParameterScript | ( | const GS::UniString & | script | ) |
Sets the parameter script. This function will replace the existing parameter script. If it is empty, the script will NOT be deleted but set to empty.
script | A GDL script which will be set as the parameter script. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::SetPassword | ( | const GS::UniString & | newPassword | ) |
Sets the password of the object. If a password is set, it will encrypt and lock the object.
newPassword | The new password. If empty, the password will be deleted. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::SetPlaceable | ( | bool | placeable | ) |
Sets the placeable flag of the object. If true, the object can be placed in a plan file.
placeable | If true, the object will be placeable. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::SetPreviewPicture | ( | const GX::ImageRef & | image | ) |
Sets the preview picture.
image | A GX::ImageRef image. The most common image formats are supported. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::SetPropertiesScript | ( | const GS::UniString & | script | ) |
Sets the properties script. This function will replace the existing properties script. If it is empty, the script will NOT be deleted but set to empty.
script | A GDL script which will be set as the properties script. |
ACAPI::Result< void > ACAPI::Library::v1::GSMObject::SetUIDefault | ( | bool | isDefault | ) |
Sets the interface as default.
isDefault | true if is default |