Archicad 29 C++ API
|
General infrastructure-level components of the API. More...
Classes | |
class | ACAPI::Impl::AbstractFactory |
AbstractFactory is responsible for creating the implementation. You can make your own factory to use it in unit tests. More... | |
class | ACAPI::Impl::FactoryRegistry |
FactoryRegistry own the registered factory. Only one factory can be registered at the same time. Use this to register your mock factory when you're unit testing your code. More... | |
class | ACAPI::AddonNotificationInterface |
AddonNotificationInterface is the abstract base class for every concrete notification interface class. More... | |
class | ACAPI::AddonServiceInterface |
AddonServiceInterface is the abstract base class for every concrete service interface class. More... | |
class | ACAPI::LicenseInfo::Impl::ProductVersionInfoImplBase |
Constructs an object of the ObjectImpl class. More... | |
class | ACAPI::Impl::ObjectImpl |
ObjectImpl is the base class for all the implementation classes. More... | |
struct | ACAPI::Error |
Error type for ACAPI::Result containing an error message and an error code. More... | |
class | ACAPI::Result< T, E > |
Result is the standard return type of API functions. More... | |
class | ACAPI::v1::APIProperty |
Class that represents a property. More... | |
class | ACAPI::v1::APIPropertyGroup |
Class that represents a group of properties. More... | |
class | ACAPI::v1::PropertyOperationManager |
Class that administrates the properties of the add-on. Created using CreatePropertyOperationManager. More... | |
class | ACAPI::Object |
A base class for all ACAPI objects. Purely technical. More... | |
class | ACAPI::UniqueID |
A unique identifier for API objects. It contains the GUID of the element and the Token of the AddOn which instantiated the element. More... | |
struct | API_Guid |
Represents a GS::Guid in the API layer. More... | |
struct | NullValueType |
Represents NullValueType in the API layer. More... | |
struct | APIVariant< Types > |
Represents a variant in the API layer. More... | |
struct | APIOptional< T > |
Represents an optional in the API layer. More... | |
Enumerations | |
enum | APIErrCodes { APIERR_GENERAL = APIErrorStart + 1 , APIERR_MEMFULL = APIErrorStart + 2 , APIERR_CANCEL = APIErrorStart + 3 , APIERR_BADID = APIErrorStart + 101 , APIERR_BADINDEX = APIErrorStart + 102 , APIERR_BADNAME = APIErrorStart + 103 , APIERR_BADPARS = APIErrorStart + 104 , APIERR_BADPOLY = APIErrorStart + 105 , APIERR_BADDATABASE = APIErrorStart + 106 , APIERR_BADWINDOW = APIErrorStart + 107 , APIERR_BADKEYCODE = APIErrorStart + 108 , APIERR_BADPLATFORMSIGN = APIErrorStart + 109 , APIERR_BADPLANE = APIErrorStart + 110 , APIERR_BADUSERID = APIErrorStart + 111 , APIERR_BADVALUE = APIErrorStart + 112 , APIERR_BADELEMENTTYPE = APIErrorStart + 113 , APIERR_IRREGULARPOLY = APIErrorStart + 114 , APIERR_BADEXPRESSION = APIErrorStart + 115 , APIERR_BADGUID = APIErrorStart + 116 , APIERR_BADTOKEN = APIErrorStart + 117 , APIERR_NO3D = APIErrorStart + 201 , APIERR_NOMORE = APIErrorStart + 202 , APIERR_NOPLAN = APIErrorStart + 203 , APIERR_NOLIB = APIErrorStart + 204 , APIERR_NOLIBSECT = APIErrorStart + 205 , APIERR_NOSEL = APIErrorStart + 206 , APIERR_NOTEDITABLE = APIErrorStart + 207 , APIERR_NOTSUBTYPEOF = APIErrorStart + 208 , APIERR_NOTEQUALMAIN = APIErrorStart + 209 , APIERR_NOTEQUALREVISION = APIErrorStart + 210 , APIERR_NOTEAMWORKPROJECT = APIErrorStart + 211 , APIERR_NOUSERDATA = APIErrorStart + 220 , APIERR_MOREUSER = APIErrorStart + 221 , APIERR_LINKEXIST = APIErrorStart + 222 , APIERR_LINKNOTEXIST = APIErrorStart + 223 , APIERR_WINDEXIST = APIErrorStart + 224 , APIERR_WINDNOTEXIST = APIErrorStart + 225 , APIERR_UNDOEMPTY = APIErrorStart + 226 , APIERR_REFERENCEEXIST = APIErrorStart + 227 , APIERR_NAMEALREADYUSED = APIErrorStart + 228 , APIERR_ATTREXIST = APIErrorStart + 301 , APIERR_DELETED = APIErrorStart + 302 , APIERR_LOCKEDLAY = APIErrorStart + 303 , APIERR_HIDDENLAY = APIErrorStart + 304 , APIERR_INVALFLOOR = APIErrorStart + 305 , APIERR_NOTMINE = APIErrorStart + 306 , APIERR_NOACCESSRIGHT = APIErrorStart + 307 , APIERR_BADPROPERTY = APIErrorStart + 308 , APIERR_BADCLASSIFICATION = APIErrorStart + 309 , APIERR_NOTEXISTINGLAYER = APIErrorStart + 310 , APIERR_NOCURRATTRSET = APIErrorStart + 311 , APIERR_MODULNOTINSTALLED = APIErrorStart + 401 , APIERR_MODULCMDMINE = APIErrorStart + 402 , APIERR_MODULCMDNOTSUPPORTED = APIErrorStart + 403 , APIERR_MODULCMDVERSNOTSUPPORTED = APIErrorStart + 404 , APIERR_NOMODULEDATA = APIErrorStart + 405 , APIERR_DEPRECATEDCALL = APIErrorStart + 406 , APIERR_PAROVERLAP = APIErrorStart + 501 , APIERR_PARMISSING = APIErrorStart + 502 , APIERR_PAROVERFLOW = APIErrorStart + 503 , APIERR_PARIMPLICIT = APIErrorStart + 504 , APIERR_RUNOVERLAP = APIErrorStart + 510 , APIERR_RUNMISSING = APIErrorStart + 511 , APIERR_RUNOVERFLOW = APIErrorStart + 512 , APIERR_RUNIMPLICIT = APIErrorStart + 513 , APIERR_RUNPROTECTED = APIErrorStart + 514 , APIERR_EOLOVERLAP = APIErrorStart + 520 , APIERR_TABOVERLAP = APIErrorStart + 530 , APIERR_NOTINIT = APIErrorStart + 901 , APIERR_NESTING = APIErrorStart + 902 , APIERR_NOTSUPPORTED = APIErrorStart + 903 , APIERR_REFUSEDCMD = APIErrorStart + 904 , APIERR_REFUSEDPAR = APIErrorStart + 905 , APIERR_READONLY = APIErrorStart + 906 , APIERR_SERVICEFAILED = APIErrorStart + 907 , APIERR_COMMANDFAILED = APIErrorStart + 908 , APIERR_NEEDSUNDOSCOPE = APIErrorStart + 909 , APIERR_UNDOSCOPEMISUSE = APIErrorStart + 910 , APIERR_MISSINGCODE = APIErrorStart + 1001 , APIERR_MISSINGDEF = APIErrorStart + 1002 } |
This enum contains the possible errors that can occur while using Archicad API. More... | |
Functions | |
virtual std::shared_ptr< LicenseInfo::Impl::ProductVersionInfoImplBase > | ACAPI::Impl::AbstractFactory::CreateLicenseInfoProductVersionInfoImpl (const API_Token &) const |
Creates an object of the ProductVersionInfoImplBase that's used by the ProductVersionInfo. | |
void | ACAPI::Impl::FactoryRegistry::RegisterFactory (std::unique_ptr< AbstractFactory > pFactory) |
Registers a new factory to the FactoryRegistry. The given factory overrides the previous one. | |
void | ACAPI::Impl::FactoryRegistry::UnregisterFactory () |
Unregisters the current factory. | |
bool | ACAPI::Impl::FactoryRegistry::IsFactoryRegistered () const |
You can check that there is already a factory registered or not. | |
const AbstractFactory & | ACAPI::Impl::FactoryRegistry::GetFactory () const |
You can get the registered factory. | |
static FactoryRegistry & | ACAPI::Impl::FactoryRegistry::GetInstance () |
You can get the registered factory. | |
ARCHICADAPI_EXPORT bool | ACAPI::IsDomainAvailable (Domain domain) |
Checks whether the domain is available for the running application. | |
ACAPI::LicenseInfo::Impl::ProductVersionInfoImplBase::ProductVersionInfoImplBase (const API_Token &token) | |
Constructs an object of the ProductVersionInfoImplBase class with the given token. | |
virtual GS::UniString | ACAPI::LicenseInfo::Impl::ProductVersionInfoImplBase::GetProductFamilyId () const |
Default implementation of the GetProductFamilyId. | |
virtual GS::UniString | ACAPI::LicenseInfo::Impl::ProductVersionInfoImplBase::GetProductName () const |
Default implementation of the GetProductName. | |
virtual GS::UniString | ACAPI::LicenseInfo::Impl::ProductVersionInfoImplBase::GetGSLanguageCode () const |
Default implementation of the GetGSLanguageCode. | |
virtual GS::UniString | ACAPI::LicenseInfo::Impl::ProductVersionInfoImplBase::GetGSProductType () const |
Default implementation of the GetGSProductType. | |
virtual GS::UniString | ACAPI::LicenseInfo::Impl::ProductVersionInfoImplBase::GetAppVersionString () const |
Default implementation of the GetAppVersionString. | |
virtual GS::UniString | ACAPI::LicenseInfo::Impl::ProductVersionInfoImplBase::GetMainVersionString () const |
Default implementation of the GetMainVersionString. | |
virtual GS::UniString | ACAPI::LicenseInfo::Impl::ProductVersionInfoImplBase::GetUpdateVersionString () const |
Default implementation of the GetUpdateVersionString. | |
virtual GS::UniString | ACAPI::LicenseInfo::Impl::ProductVersionInfoImplBase::GetHotfixVersionString () const |
Default implementation of the GetVersioNum3. | |
virtual Int32 | ACAPI::LicenseInfo::Impl::ProductVersionInfoImplBase::GetBuildNum () const |
Default implementation of the GetBuildNum. | |
ACAPI::Impl::ObjectImpl::ObjectImpl (const API_Token &token) | |
Constructs an object of the ObjectImpl class. | |
const API_Token & | ACAPI::Impl::ObjectImpl::GetToken () const |
You can get the token that's used by the implementation. | |
ARCHICADAPI_EXPORT GS::UniString | ACAPI::GetCEIPProjectID (const IO::Location &projectLocation) |
Unique identifier of the project. Useful for usage logging. | |
Result< void > | ACAPI::v1::PropertyOperationManager::RegisterAllProperties () |
Registers all properties of the add-on. | |
Result< void > | ACAPI::v1::PropertyOperationManager::UnregisterAllProperties () |
Unregisters all properties of the add-on. | |
Result< APIPropertyGroup > | ACAPI::v1::PropertyOperationManager::CreateAPIPropertyGroup (const GS::Guid &groupGuid, GS::UniString groupName, const DG::Icon &icon) |
Creates a property group (but does not yet add it). | |
Result< APIProperty > | ACAPI::v1::PropertyOperationManager::CreateAndAddAPIProperty (APIPropertyGroup &propertyGroup, const GS::Guid &propertyGuid, GS::UniString propertyName, PropertyOperations::CriteriaEnvironmentType criteriaEnvironmentType, PropertyOperations::GroupAvailability groupAvailability, PropertyOperations::PropertyToUseInContext propertyToUseInContext, PropertyOperations::PropertyValueType valueType, bool isSummable, const GS::Array< API_ElemType > &availableForElemsOfTypes, const DG::Icon &icon, std::function< bool(const API_Guid &)> isEvaluableFor, std::function< std::variant< Int32, double, GS::UniString, bool >(const API_Guid &)> getValueFrom) |
Creates a new property. | |
Result< void > | ACAPI::v1::PropertyOperationManager::AddPropertyGroup (APIPropertyGroup propertyGroup) |
Adds a property group. | |
Result< PropertyOperationManager > PROPERTYOPERATIONSAPI_EXPORT | ACAPI::v1::CreatePropertyOperationManager (const API_Token &token) |
Create a PropertyOperationManager object that administrates the properties of the add-on. | |
API_Guid | GenerateAPIGuid () |
constexpr bool | operator== (NullValueType, NullValueType) |
compares NullValueTyp in the API layer. | |
Variables | |
constexpr API_Guid | APINULLGuid = {} |
Represents an empty API guid. | |
General infrastructure-level components of the API.
enum APIErrCodes |
This enum contains the possible errors that can occur while using Archicad API.
Enumerator | |
---|---|
APIERR_GENERAL | General error code. |
APIERR_MEMFULL | Insufficient memory. |
APIERR_CANCEL | The operation has been canceled by the user, in case of a long process. |
APIERR_BADID | The passed identifier is not a valid one, or valid, but not proper for the given operation. |
APIERR_BADINDEX | The passed index is out of range. |
APIERR_BADNAME | The passed name is not proper or not found in the existing list. |
APIERR_BADPARS | The passed parameters are inconsistent. |
APIERR_BADPOLY | The passed polygon cannot be interpreted. |
APIERR_BADDATABASE | The command cannot be executed on the current database. |
APIERR_BADWINDOW | The command cannot be executed while the current window is active. |
APIERR_BADKEYCODE | The key code cannot be found in the listing database. |
APIERR_BADPLATFORMSIGN | The passed platform sign is not valid. See ACAPI_ModulData_Store. |
APIERR_BADPLANE | The plane equation is incorrect. |
APIERR_BADUSERID | The passed user ID (TeamWork client) is not valid. |
APIERR_BADVALUE | The passed autotext value is not valid. See ACAPI_AutoText_SetAnAutoText. |
APIERR_BADELEMENTTYPE | The function cannot be applied to the passed element type. See ACAPI_Element_Trim_Elements. |
APIERR_IRREGULARPOLY | The passed polygon or polyline is irregular. See API_RegularizedPoly. |
APIERR_BADEXPRESSION | The passed expression string is syntactically incorrect. |
APIERR_BADGUID | The passed guid is invalid or valid, but not proper for the given operation. |
APIERR_BADTOKEN | The passed token is invalid. See ACAPI_GetToken. |
APIERR_NO3D | There is no 3D information assigned to the passed element. |
APIERR_NOMORE | No more database items can be returned. |
APIERR_NOPLAN | There is no open project. The operation cannot be executed without an open project. |
APIERR_NOLIB | No library was loaded. The operation cannot be executed without a loaded library. Can be returned by ACAPI_LibraryPart_Create. |
APIERR_NOLIBSECT | The requested LibPart section is not found. |
APIERR_NOSEL | No selection. The operation cannot be executed without any element selected. |
APIERR_NOTEDITABLE | The referenced element is not editable. |
APIERR_NOTSUBTYPEOF | The specified first library part unique ID does not refer to a subtype of the second unique ID. See ACAPI_LibraryPart_CheckLibPartSubtypeOf. |
APIERR_NOTEQUALMAIN | The main GUID parts of the specified two library part unique IDs are not equal. See ACAPI_LibraryPart_CompareLibPartUnIds. |
APIERR_NOTEQUALREVISION | The main GUID parts of the specified two library part unique IDs are equal but their revision IDs differ. See ACAPI_LibraryPart_CompareLibPartUnIds. |
APIERR_NOTEAMWORKPROJECT | There is no open project, or not in Teamwork mode. |
APIERR_NOUSERDATA | Attempt to get user data assigned to an element, but there isn't any. |
APIERR_MOREUSER | The user data cannot be assigned to the element, since there is no free storage block avaliable. |
APIERR_LINKEXIST | The link already exists. |
APIERR_LINKNOTEXIST | The link doesn't exist. |
APIERR_WINDEXIST | The window to be opened already exists. |
APIERR_WINDNOTEXIST | The referenced window does not exist. |
APIERR_UNDOEMPTY | No undoable entry has got into the opened undo operation. |
APIERR_REFERENCEEXIST | The reference already exists. |
APIERR_NAMEALREADYUSED | The resource must have a unique name but the specified one is already taken. |
APIERR_ATTREXIST | The attribute already exists. |
APIERR_DELETED | Reference to a deleted, purged or non-existent database item. |
APIERR_LOCKEDLAY | The referenced layer is locked. |
APIERR_HIDDENLAY | The referenced layer is hidden. |
APIERR_INVALFLOOR | The passed floor index is out of range. |
APIERR_NOTMINE | The database item is not in the user's workspace. |
APIERR_NOACCESSRIGHT | Can't access / create / modify / delete an item in a teamwork server. |
APIERR_BADPROPERTY | The property for the passed element or attribute is not available. |
APIERR_BADCLASSIFICATION | Can't set the classification for the passed element or attribute. |
APIERR_NOTEXISTINGLAYER | Given layer parameter index is not an existing one. |
APIERR_NOCURRATTRSET | No current attributeset |
APIERR_MODULNOTINSTALLED | The referenced add-on is not installed. For more details see the Communication Manager. |
APIERR_MODULCMDMINE | The target add-on is the caller add-on. For more details see the Communication Manager. |
APIERR_MODULCMDNOTSUPPORTED | The referenced command is not supported by the target add-on. For more details see the Communication Manager. |
APIERR_MODULCMDVERSNOTSUPPORTED | The requested command version is newer than the version of the command that the target add-on can support. For more details see the Communication Manager. |
APIERR_NOMODULEDATA | No custom data section is saved into the project file identified by the add-on's unique ID. See ACAPI_ModulData_GetInfo. |
APIERR_DEPRECATEDCALL | The command (for this element type) is implemented on the C++ API in ArchicadAPI module and it is no longer available via the Old API. The function where it occured can be called for compatibility reasons but it takes no effect. For further information you can search the corresponding functionality in the API Documentation. |
APIERR_PAROVERLAP | Two or more paragraphs are overlapped. The end offset of one is greater than the beginner offset of the next one. |
APIERR_PARMISSING | Number of paragraphs - the size of |
APIERR_PAROVERFLOW | Paragraph end offset is run over the content length. |
APIERR_PARIMPLICIT | The content string contains line end character (CR) at invalid position (inside the paragraph range). |
APIERR_RUNOVERLAP | Two or more runs are overlapped. The end offset of one is greater than the beginner offset of the next one. |
APIERR_RUNMISSING | Number of runs - the size of |
APIERR_RUNOVERFLOW | Run end offset is run over the content length. |
APIERR_RUNIMPLICIT | The beginner offset of one is greater than the end offset of the previous one. |
APIERR_RUNPROTECTED | Attempted to overwrite a protected text run (not used yet). |
APIERR_EOLOVERLAP | The EOL array is not a monotonous ascendant sequence. |
APIERR_TABOVERLAP | The tabulator array is not a monotonous ascendant sequence. |
APIERR_NOTINIT | The command needs initialization by an other API call. |
APIERR_NESTING | The API function is not reentrant. Nesting occurred. |
APIERR_NOTSUPPORTED | The command is not supported by the server application. It is not environment dependent. The server application cannot execute the command generally. |
APIERR_REFUSEDCMD | The passed identifier is not subject to the operation. |
APIERR_REFUSEDPAR | The command cannot be executed with the passed parameters. |
APIERR_READONLY | The specified location is read-only. Can be returned by ACAPI_LibraryPart_Create. |
APIERR_SERVICEFAILED | The invoked Teamwork service has failed. |
APIERR_COMMANDFAILED | The invoked undoable command threw an exception. Can be returned by ACAPI_CallUndoableCommand. |
APIERR_NEEDSUNDOSCOPE | The called command should be encapsulated in a ACAPI_CallUndoableCommand scope. |
APIERR_UNDOSCOPEMISUSE | The called command shouldn't be encapsulated in a ACAPI_CallUndoableCommand scope. |
APIERR_MISSINGCODE | The function is not implemented yet. |
APIERR_MISSINGDEF | The originating library part file is missing. The document name is still filled. |
Result< void > ACAPI::v1::PropertyOperationManager::AddPropertyGroup | ( | APIPropertyGroup | propertyGroup | ) |
Adds a property group.
propertyGroup | is the property group to add. |
|
nodiscard |
Creates a new property.
propertyGroup | is the group where to property is added to. |
propertyGuid | is the guid of the property (must be unique). |
propertyName | is the name of the property (must be not empty). |
criteriaEnvironmentType | is the criteria environment type of the property. |
groupAvailability | is the group availability of the property. |
propertyToUseInContext | is the property to use in context of the property. |
valueType | is the value type of the property. |
isSummable | is the property summable. |
availableForElemsOfTypes | is a list of all elements that this property should be available for (must be not empty). |
icon | is the icon of the property (must be not empty). |
isEvaluableFor | function to check if property is evaluable for given elem. |
getValueFrom | function to get the value of property from elem. Must return Int32 for Integer properties, double for Numeric properties, GS::UniString for String properties and bool for Boolean properties. |
|
nodiscard |
Creates a property group (but does not yet add it).
groupGuid | is the guid of the group (must be unique). |
groupName | is the name of the group (must be not empty). |
icon | is the icon of the group (must be not empty). |
|
virtual |
Creates an object of the ProductVersionInfoImplBase that's used by the ProductVersionInfo.
|
nodiscard |
Create a PropertyOperationManager object that administrates the properties of the add-on.
token | is the token of the add-on. |
|
virtual |
Default implementation of the GetAppVersionString.
|
virtual |
Default implementation of the GetBuildNum.
ARCHICADAPI_EXPORT GS::UniString ACAPI::GetCEIPProjectID | ( | const IO::Location & | projectLocation | ) |
Unique identifier of the project. Useful for usage logging.
projectLocation | should be the location of the project. |
const AbstractFactory & ACAPI::Impl::FactoryRegistry::GetFactory | ( | ) | const |
You can get the registered factory.
|
virtual |
Default implementation of the GetGSLanguageCode.
|
virtual |
Default implementation of the GetGSProductType.
|
virtual |
Default implementation of the GetVersioNum3.
|
static |
You can get the registered factory.
|
virtual |
Default implementation of the GetMainVersionString.
|
virtual |
Default implementation of the GetProductFamilyId.
|
virtual |
Default implementation of the GetProductName.
|
inline |
You can get the token that's used by the implementation.
|
virtual |
Default implementation of the GetUpdateVersionString.
ARCHICADAPI_EXPORT bool ACAPI::IsDomainAvailable | ( | Domain | domain | ) |
Checks whether the domain is available for the running application.
domain | The desired domain to check. |
bool ACAPI::Impl::FactoryRegistry::IsFactoryRegistered | ( | ) | const |
You can check that there is already a factory registered or not.
ACAPI::Impl::ObjectImpl::ObjectImpl | ( | const API_Token & | token | ) |
Constructs an object of the ObjectImpl class.
token | The token used by the implementation. |
|
constexpr |
compares NullValueTyp in the API layer.
ACAPI::LicenseInfo::Impl::ProductVersionInfoImplBase::ProductVersionInfoImplBase | ( | const API_Token & | token | ) |
Constructs an object of the ProductVersionInfoImplBase class with the given token.
token | The token used by the implementation. |
Result< void > ACAPI::v1::PropertyOperationManager::RegisterAllProperties | ( | ) |
Registers all properties of the add-on.
void ACAPI::Impl::FactoryRegistry::RegisterFactory | ( | std::unique_ptr< AbstractFactory > | pFactory | ) |
Registers a new factory to the FactoryRegistry. The given factory overrides the previous one.
pFactory | The given factory to be registered. |
Result< void > ACAPI::v1::PropertyOperationManager::UnregisterAllProperties | ( | ) |
Unregisters all properties of the add-on.
void ACAPI::Impl::FactoryRegistry::UnregisterFactory | ( | ) |
Unregisters the current factory.