Simulation & Probabilistic Analysis SDK
Add Distribution Fitting & Simulation Features to Your Applications

SPA SDK Help HomeLearn More About the SPA SDK

SPAApplication.TrialDaysLeft (property)

Description

Returns the number of days left until the Evaluation License expires. When deploying your application to the end users, you might want to give them an ability to evaluate the SDK using the Evaluation License, however, if the license expires, and you call the SPAApplication.Initialize method, the SDK may display an appropriate message to the user. To avoid this behavior, use the SPAApplication.TrialDaysLeft property to determine whether the Evaluation License has expired before initializing the SDK, as shown in the example below.

Syntax

object.TrialDaysLeft

Return Value

(Long) - the number of days left:

Value
Description
Positive value (>0) The number of days left until the Evaluation License expires.
Zero (0) The Evaluation License has expired, and the SDK can no longer be used.
Negative value (<0) The SDK is licensed to be used without any time limitations.

Example

Sub Test()
  Dim daysleft As Long
  daysLeft = SPAApplication.TrialDaysLeft

  If daysLeft > 0 Then
    MsgBox "The trial period will expire in " + Str(daysLeft) + " day(s)"
  ElseIf daysLeft < 0 Then
    MsgBox "You are using the licensed version"
  Else
    MsgBox "The trial period has expired"
    ' don't use the SDK
    Exit Sub
  End If

  ' use the SDK
  SPAApplication.Initialize
  ' ...
End Sub
  
Copyright © MathWave Technologies
www.mathwave.com