GetLicenseGracePeriod
- Last UpdatedOct 29, 2026
- 2 minute read
This function returns the number of minutes remaining until the license grace period expires.
|
Function |
Group |
Execution |
String Exp. |
Windows |
Windows Embedded |
IoT View |
Thin Clients |
Mobile Access |
|---|---|---|---|---|---|---|---|---|
|
GetLicenseGracePeriod |
System Info |
Synchronous |
Yes |
Supported |
Not supported |
Not supported |
Supported (see Notes below) |
Supported (see Notes below) |
Syntax
GetLicenseGracePeriod( )
This function has no parameters.
Returned value
If this function is executed successfully, then it returns the number of minutes remaining in the license grace period. Otherwise, it returns one of the following possible values:
|
Value |
Description |
|---|---|
|
-1 |
The software is licensed. |
|
0 |
The license grace period has expired. In most cases, this value will never actually be returned because if the grace period has expired, then the project has stopped. |
Notes
The license grace period is relevant only if the software (that is, the development application and/or the project runtime) is configured to get its license from a license server and it has somehow lost its connection to that server. For more information, see About License Server.
By default, the license grace period is 60 minutes. If you need to change the period, then please contact your software vendor.
Also, this function may be called by a Screen Script or Command animation on a specific thin client, but the returned value applies to the entire project runtime. Thin clients do not have their own licenses. Instead, the project runtime is licensed to support a number of thin clients, and the thin client on which the function is executed is included in that number.
Example
The following VBScript example shows how to check the grace period and then display an appropriate message to the user:
Dim remainingGracePeriod
remainingGracePeriod = $GetLicenseGracePeriod()
If (remainingGracePeriod = -1) Then
MsgBox "License OK"
Else
MsgBox "Running on Grace Period! [" + remainingGracePeriod + "] minute(s) remaining"
End If