Obtain NLME License
obtain_NLMELicense.RdThis 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.,
INSTALLDIRenvironment variable. Thecadlicensingtoolexecutable is expected to be located within this directory, or within a subdirectory specified by thePML_BIN_DIRenvironment 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
if (FALSE) { # \dontrun{
INSTALLDIR <- Sys.getenv("INSTALLDIR")
if (INSTALLDIR == "") INSTALLDIR <- "C:/Program Files/Certara/NLME_Engine"
result <- obtain_NLMELicense(INSTALLDIR, verbose = TRUE)
if (result) {
message("License obtained successfully!")
} else {
message("Failed to obtain license.")
}
} # }