Archicad 27 C++ API
Loading...
Searching...
No Matches
Licensing

Functions providing information about Archicad licensing. More...

Namespaces

namespace  API_SSALevels
 Constants of API_SSALevel.
 

Typedefs

typedef GSErrCode __ACENV_CALL APILicenseBorrowStatusChangeHandlerProc(API_LicenseBorrowStatusTypeID licenseBorrowStatus)
 User supplied callback procedure for handling license borrowing status changes.
 
using API_SSALevel = UInt32
 This is a numeric value representing an SSA subscription level. Use the named constants from the API_SSALevels namespace: NoSSA, SSA, Forward.
 

Functions

void __ACENV_CALL ACAPI_Licensing_InvokeForwardDialog ()
 Invoke generic SSA Forward dialog that warn that the user don't have SSA license.
 
GSErrCode __ACENV_CALL ACAPI_Licensing_CatchLicenseBorrowStatusChange (APILicenseBorrowStatusChangeHandlerProc *handlerProc)
 Catches notifications on license borrowing status changes.
 
UInt32 __ACENV_CALL ACAPI_Licensing_GetProtectionMode ()
 Retrieves information about the protection mode.
 
UInt32 __ACENV_CALL ACAPI_Licensing_GetSerialNumber ()
 Retrieves the unique serial number of the current license.
 
UInt16 __ACENV_CALL ACAPI_Licensing_GetBoxMask ()
 Retrieves the box mask of the current license.
 
GS::UniString __ACENV_CALL ACAPI_Licensing_GetConfigurationNumber ()
 Retrieves the configuration number of the current license.
 
UInt32 __ACENV_CALL ACAPI_Licensing_GetNumberOfLicenses ()
 Retrieves the number of current licenses.
 
GSTime __ACENV_CALL ACAPI_Licensing_GetExpirationTime ()
 Retrieves the expiration time of the current license (if any).
 
GS::UniString __ACENV_CALL ACAPI_Licensing_GetPartnerId ()
 When Archicad runs on an SSA license, this string contains the internal identifier of the reseller.
 
bool __ACENV_CALL ACAPI_Licensing_IsSSALevelAtLeast (API_SSALevel requiredLevel)
 Returns whether the SSA subscription passed in the parameter is available.
 

Detailed Description

Functions providing information about Archicad licensing.

Typedef Documentation

◆ API_SSALevel

This is a numeric value representing an SSA subscription level. Use the named constants from the API_SSALevels namespace: NoSSA, SSA, Forward.

Since
Archicad 26
Remarks
The ACAPI_Licensing_IsSSALevelAtLeast function can be used to query the availability of a certain SSA subscription.

◆ APILicenseBorrowStatusChangeHandlerProc

typedef GSErrCode __ACENV_CALL APILicenseBorrowStatusChangeHandlerProc(API_LicenseBorrowStatusTypeID licenseBorrowStatus)

User supplied callback procedure for handling license borrowing status changes.

Parameters
licenseBorrowStatus[out] The status of license borrowing, can be API_LicenseBorrowed or API_LicenseReturned.
Returns
  • NoError - The function has completed with success.
Remarks
This notification comes when the user borrows or returns a license, and allows you to act accordingly.

Function Documentation

◆ ACAPI_Licensing_CatchLicenseBorrowStatusChange()

GSErrCode __ACENV_CALL ACAPI_Licensing_CatchLicenseBorrowStatusChange ( APILicenseBorrowStatusChangeHandlerProc handlerProc)

Catches notifications on license borrowing status changes.

Parameters
handlerProc[in] The callback function which receives the notifications.
Returns
  • NoError - The function has completed with success.
Remarks
This function allows you to act on license borrowing and returning.

◆ ACAPI_Licensing_GetBoxMask()

UInt16 __ACENV_CALL ACAPI_Licensing_GetBoxMask ( )

Retrieves the box mask of the current license.

Since
Archicad 26
Returns
Remarks
The box mask is applicable only in the case of hardware and software licenses.

◆ ACAPI_Licensing_GetConfigurationNumber()

GS::UniString __ACENV_CALL ACAPI_Licensing_GetConfigurationNumber ( )

Retrieves the configuration number of the current license.

Remarks
The configuration number is applicable only in the case of hardware and software licenses.
Since
Archicad 26
Returns
The current license's configuration number (also known as the container code).

◆ ACAPI_Licensing_GetExpirationTime()

GSTime __ACENV_CALL ACAPI_Licensing_GetExpirationTime ( )

Retrieves the expiration time of the current license (if any).

Since
Archicad 26
Returns
  • GSTime - The expiration time of the current license.

◆ ACAPI_Licensing_GetNumberOfLicenses()

UInt32 __ACENV_CALL ACAPI_Licensing_GetNumberOfLicenses ( )

Retrieves the number of current licenses.

Since
Archicad 26
Returns
The number of licenses.

◆ ACAPI_Licensing_GetPartnerId()

GS::UniString __ACENV_CALL ACAPI_Licensing_GetPartnerId ( )

When Archicad runs on an SSA license, this string contains the internal identifier of the reseller.

Since
Archicad 26
Returns

◆ ACAPI_Licensing_GetProtectionMode()

UInt32 __ACENV_CALL ACAPI_Licensing_GetProtectionMode ( )

Retrieves information about the protection mode.

Since
Archicad 26
Returns
Remarks
You can use the following predefined masks to retrieve information about the protection type.
  • APIPROT_SITE_MASK: More license (full version)
  • APIPROT_NFR_MASK: Not For Resale version (full version)
  • APIPROT_SCHOOL_MASK: School version (full version)
  • APIPROT_PPU_MASK:?PPU version (full version)
  • APIPROT_NET_MASK: Network licensing
  • APIPROT_TW_MASK: TeamWork functionality is on
  • APIPROT_PROTEDU_MASK: Education version
  • APIPROT_START_MASK : Start edition Usable masks in case of no hardware or software key:
  • APIPROT_EDU_MASK: Education version
  • APIPROT_DEMO_MASK: Demo version
  • APIPROT_TRIAL_MASK: Trial version
  • APIPROT_BTC_MASK : BIM Cloud Team Client version This information can be used to restrict the functionality of your Add-On for certain Archicad editions and license types (use the bitwise-AND operator to find out your license parameters).
Example
bool IsInDemoMode ()
{
return ACAPI_Licensing_GetProtectionMode () & APIPROT_DEMO_MASK;
}
UInt32 __ACENV_CALL ACAPI_Licensing_GetProtectionMode()
Retrieves information about the protection mode.

◆ ACAPI_Licensing_GetSerialNumber()

UInt32 __ACENV_CALL ACAPI_Licensing_GetSerialNumber ( )

Retrieves the unique serial number of the current license.

Since
Archicad 26
Returns
Remarks
The serial number of hardware and software licenses can be queried with this function.

◆ ACAPI_Licensing_InvokeForwardDialog()

void __ACENV_CALL ACAPI_Licensing_InvokeForwardDialog ( )

Invoke generic SSA Forward dialog that warn that the user don't have SSA license.

Since
Archicad 26

◆ ACAPI_Licensing_IsSSALevelAtLeast()

bool __ACENV_CALL ACAPI_Licensing_IsSSALevelAtLeast ( API_SSALevel  requiredLevel)

Returns whether the SSA subscription passed in the parameter is available.

Since
Archicad 26
Parameters
requiredLevel[in] The level to check the current level against.
Returns
Example
bool ShouldEnableFeatureInAddOn ()
{
return ACAPI_Licensing_IsSSALevelAtLeast (API_SSALevels::Forward);
}
bool __ACENV_CALL ACAPI_Licensing_IsSSALevelAtLeast(API_SSALevel requiredLevel)
Returns whether the SSA subscription passed in the parameter is available.