Obtain NLME License
obtain_NLMELicense.Rd
This function attempts to authenticate and obtain an NLME license using the specified installation directory and licensing tool.
Usage
obtain_NLMELicense(
InstallDir = Sys.getenv("INSTALLDIR"),
ForceAuth = FALSE,
ForceLicenseGet = FALSE,
verbose = getOption("verbose")
)
Arguments
- InstallDir
A character string specifying the directory where the NLME Engine is installed e.g.,
INSTALLDIR
environment variable. Thecadlicensingtool
executable is expected to be located within this directory, or within a subdirectory specified by thePML_BIN_DIR
environment variable.- ForceAuth
A logical value indicating whether to force re-authentication even if already authenticated. Default is
FALSE
.- ForceLicenseGet
A logical value indicating whether to force obtaining the license even if already licensed. Default is
FALSE
.- verbose
A logical value indicating whether to print verbose output. Default is
getOption("verbose")
.
Details
This function checks for the presence of the necessary
appsettings.json
file as indicated by the CAD_CONFIG_FILE
environment variable,
runs the licensing tool to authenticate the user, and attempts to obtain
an NLME license. It prints detailed messages if the verbose
parameter is set to TRUE
.
Examples
# \donttest{
result <- obtain_NLMELicense("C:/Program Files/Certara/NLME_Engine", verbose = TRUE)
#> CAD_OPENID_URL env.variable is set and will be used.
#> auth print output:
#> Access token: expires at 2026-03-26 15:07:35
#> Refresh token: expires at 2026-03-26 15:07:35
#> license print output:
#>
#> License status: OK
#> Issuer: https://certara.dev.certara.net
#> Issued for: james.craig@certara.com (ebc15527-70b0-4779-b501-0f80c8afc6b5)
#> Issued at: 2025-04-07 20:38:27
#> Expires at: 2025-05-07 20:38:27
#> Products:
#> - key: pirana, expiration: 2026-04-08T03:38:27.210867949Z
#> - key: simcyp-int, expiration: 2026-04-08T03:38:27.211005447Z
#> - key: darwin, expiration: 2026-04-08T03:38:27.211014916Z
#> - key: FullLicense, expiration: 2026-04-08T03:38:27.211021307Z
#> - key: Administrator, expiration: 2026-04-08T03:38:27.211061724Z
#> - key: nlme, expiration: 2026-04-08T03:38:27.211069978Z
#> License status: OK
#> User's Email: james.craig@certara.com
#> Issuer: https://certara.dev.certara.net
#> License expires: 2026-04-08
#> Refresh until: 2025-05-07 20:38:27
#> CurrentDate: 2025-04-07
if (result) {
message("License obtained successfully!")
} else {
message("Failed to obtain license.")
}
#> License obtained successfully!
# }