Archicad 28 C++ API
Loading...
Searching...
No Matches
LicenseInfo

Functions providing information about the Archicad product and license. More...

Namespaces

namespace  API_SSALevels
 Constants of API_SSALevel.
 

Classes

class  ACAPI::LicenseInfo::v1::LicenseInfoManager
 LicenseInfoManager is the entry point of the license or product-related informations. More...
 
class  ACAPI::LicenseInfo::v1::ProductVersionInfo
 ProductVersionInfo is the central point of the product-related informations. More...
 

Typedefs

typedef GSErrCode 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

ProductVersionInfo ACAPI::LicenseInfo::v1::LicenseInfoManager::GetProductVersionInfo () const
 Returns an instance of ProductVersionInfo.
 
Result< LicenseInfoManagerACAPI::LicenseInfo::v1::GetLicenseInfoManager ()
 Creates a LicenseInfoManager instance.
 
GS::UniString ACAPI::LicenseInfo::v1::ProductVersionInfo::GetProductFamilyId () const
 
GS::UniString ACAPI::LicenseInfo::v1::ProductVersionInfo::GetGSLanguageCode () const
 
GS::UniString ACAPI::LicenseInfo::v1::ProductVersionInfo::GetVersionString () const
 
Int32 ACAPI::LicenseInfo::v1::ProductVersionInfo::GetVersionNum1 () const
 
Int32 ACAPI::LicenseInfo::v1::ProductVersionInfo::GetVersionNum2 () const
 
Int32 ACAPI::LicenseInfo::v1::ProductVersionInfo::GetVersionNum3 () const
 
Int32 ACAPI::LicenseInfo::v1::ProductVersionInfo::GetBuildNum () const
 
void ACAPI_Licensing_InvokeForwardDialog ()
 Invoke generic SSA Forward dialog that warn that the user don't have SSA license.
 
GSErrCode ACAPI_Licensing_CatchLicenseBorrowStatusChange (APILicenseBorrowStatusChangeHandlerProc *handlerProc)
 Catches notifications on license borrowing status changes.
 
UInt32 ACAPI_Licensing_GetProtectionMode ()
 Retrieves information about the protection mode.
 
UInt32 ACAPI_Licensing_GetSerialNumber ()
 Retrieves the unique serial number of the current license.
 
UInt16 ACAPI_Licensing_GetBoxMask ()
 Retrieves the box mask of the current license.
 
GS::UniString ACAPI_Licensing_GetConfigurationNumber ()
 Retrieves the configuration number of the current license.
 
UInt32 ACAPI_Licensing_GetNumberOfLicenses ()
 Retrieves the number of current licenses.
 
GSTime ACAPI_Licensing_GetExpirationTime ()
 Retrieves the expiration time of the current license (if any).
 
GS::UniString ACAPI_Licensing_GetPartnerId ()
 When Archicad runs on an SSA license, this string contains the internal identifier of the reseller.
 
bool ACAPI_Licensing_IsSSALevelAtLeast (API_SSALevel requiredLevel)
 Returns whether the SSA subscription passed in the parameter is available.
 

Detailed Description

Functions providing information about the Archicad product and license.

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 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 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 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 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 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 ACAPI_Licensing_GetNumberOfLicenses ( )

Retrieves the number of current licenses.

Since
Archicad 26
Returns
The number of licenses.

◆ ACAPI_Licensing_GetPartnerId()

GS::UniString 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 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 ACAPI_Licensing_GetProtectionMode()
Retrieves information about the protection mode.

◆ ACAPI_Licensing_GetSerialNumber()

UInt32 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 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 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 ()
{
}
bool ACAPI_Licensing_IsSSALevelAtLeast(API_SSALevel requiredLevel)
Returns whether the SSA subscription passed in the parameter is available.
const API_SSALevel Forward
Constant of Forward subscription.
Definition: APIdefs_Registration.h:87

◆ GetBuildNum()

Int32 ACAPI::LicenseInfo::v1::ProductVersionInfo::GetBuildNum ( ) const
Returns
Returns the build number of the product.

◆ GetGSLanguageCode()

GS::UniString ACAPI::LicenseInfo::v1::ProductVersionInfo::GetGSLanguageCode ( ) const
Returns
Returns the language of the application in a Graphisoft-specific format.
Graphisoft-specific format Language
ARA Arabic
AUS Australian English
AUT Austrian
BUL Bulgarian
CHE Swiss German
CHI Simplified Chinese
CRO Croatian
CZE Czech
DEN Danish
EST Estonian
FIN Finnish
FRA French
GER German
GRE Greek
HUN Hungarian
ICE Icelandian
ITA Italian
INT International English
ISR Israeli
JPN Japanese
KOR Korean
NED Dutch
NZE New Zealand English
NOR Norwegian
POL Polish
POR Portuguese
ENG British English
ROM Romanian
RUS Russian
SLO Slovak
SPA Spanish
SWE Swedish
TAI Traditional Chinese
TUR Turkish
USA USA English
IND Indic
BRA Brasil
UKI United Kingdom & Ireland
IRN Iran
UKR Ukraine

◆ GetLicenseInfoManager()

Result< LicenseInfoManager > ACAPI::LicenseInfo::v1::GetLicenseInfoManager ( )
inline

Creates a LicenseInfoManager instance.

Returns
The new LicenseInfoManager instance.
Remarks
This is the entry point of the license information on the API.

◆ GetProductFamilyId()

GS::UniString ACAPI::LicenseInfo::v1::ProductVersionInfo::GetProductFamilyId ( ) const
Returns
Returns the family of the product.

◆ GetProductVersionInfo()

ProductVersionInfo ACAPI::LicenseInfo::v1::LicenseInfoManager::GetProductVersionInfo ( ) const

Returns an instance of ProductVersionInfo.

Returns
Returns the product version info or error.

◆ GetVersionNum1()

Int32 ACAPI::LicenseInfo::v1::ProductVersionInfo::GetVersionNum1 ( ) const
Returns
Returns the first number of the version (main version).

◆ GetVersionNum2()

Int32 ACAPI::LicenseInfo::v1::ProductVersionInfo::GetVersionNum2 ( ) const
Returns
Returns the second number of the version (update version).

◆ GetVersionNum3()

Int32 ACAPI::LicenseInfo::v1::ProductVersionInfo::GetVersionNum3 ( ) const
Returns
Returns the third number of the version (hotfix version).

◆ GetVersionString()

GS::UniString ACAPI::LicenseInfo::v1::ProductVersionInfo::GetVersionString ( ) const
Returns
Returns the version of the product as a string.