SketchUp C API

- Main Page
- Related Pages
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Data Fields | Related Functions
SUExtensionLicense Struct Reference

Stores extension license information. More...

`#include <SketchUpAPI/extension_license.h>`

## Data Fields
bool | is_licensed
| Main flag indicating whether the extension is allowed to run or not.
enum SUExtensionLicenseState | state
| Additional state information.
size_t | days_remaining
| Number of days until license expiration. 0 if permanent or not licensed.
char | error_description [512]

## Related Functions
(Note that these are not member functions.)
enum SUResult | SUGetExtensionLicense (const char *extension_id, struct SUExtensionLicense *out_license)
| Gets a license for a given extension. More...

## Detailed Description

Stores extension license information.

## Friends And Related Function Documentation

enum SUResult SUGetExtensionLicense | ( | const char * | extension_id,
|  | struct SUExtensionLicense * | out_license
| ) |  |
| related

Gets a license for a given extension.

Starting in SketchUp 2025.0 (API 13.0), this function automatically tries to fetch a license from Extension Warehouse if the extension doesn't have a license on the current device. This only works if the user is signed in. In earlier SketchUp versions, the user has to go to Extension Manager, expand the extension in question and press Update License if the license is missing. (For performance reasons this automatic fetching is skipped during SketchUp startup. Make sure to do a license check when the user interacts with the extension).

Parameters

  [in] | extension_id | The Extension Warehouse UUID for the extension.
  [out] | out_license | the licensing retrieved.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_GENERIC if retrieving the extension license failed
  - SU_ERROR_NULL_POINTER_INPUT if extension_id is NULL
  - SU_ERROR_NULL_POINTER_OUTPUT if out_license is NULL

## Field Documentation

char SUExtensionLicense::error_description[512]

Error description in case of failure to acquire a license. This is meant to aid in debugging only. Extensions should not rely on any exact error description.

The documentation for this struct was generated from the following file:

- SketchUpAPI/extension_license.h