Skip to content

License Borrowing🔗

General🔗

License borrowing allows client users to check out features from a license server (for off-line use) for a limited period (currently, the maximum time period is 420 hours). License borrowing is enabled by default in Modelon licensing. The borrow commands are run from command prompt. Should you experience any problems with using this guide or borrowing a server license, please contact support@modelon.com.

Borrowing licenses for end users🔗

License borrowing is initiated with the lmborrow utility in lmutil, distributed with your Modelon product. License borrowing must be initiated while having a connection to the license server.

Modelon Libraries🔗

Borrowing a License🔗

Basically, license borrowing is realized by invoking lmutil with lmborrow option in the product installation folder (change the directory to "\\<Library Name>\Resources\License\win32"). The command syntax is;

lmutil lmborrow vendor enddate [endtime]

Table 1: Arguments for license borrowing command

Argument Description
vendor Vendor daemon that serves the licenses to be borrowed. Ex: modelon
enddate Specifies for how long the license should be borrowed and is of the form dd-mmm-yyyy. Ex: 01-Dec-2016
endtime The end time of the borrow period is optional, and if given, it should be of the form hh:mm. If no end time is specified, it defaults to 23:59, meaning that the license is borrowed for the full duration of the end date.

For example:

Change the working directory to the installation folder of the library for which a license should be borrowed (see above).

User command lmutil lmborrow modelon 12-Jul-2018 23:59 prints out the following message:

lmutil - Copyright (c) 1989-2017 Flexera Software LLC. All Rights Reserved.

Setting LM_BORROW=12-jul-2018:modelon:12-Jul-2018:23:59

Once you run the borrow command, you have to check-out the library at least once while you are online and connected to the license server - only then will the license be borrowed. In this example, the respective library is borrowed and scheduled to be returned at 23:59 on July 12, 2018.

The current default limit for borrow time for Modelon products is 420 hours (2.5 weeks) from when license borrowing is initiated. License administrators may lower this limit, but it cannot be increased.

Clearing the Borrow Period🔗

Once the license borrowing is initiated, and until the end of the day that it is initiated, any license for a Modelon product that is checked out will be borrowed for off-line use until the end of the specified borrow period. Each license will be borrowed only once even if it is checked-out multiple times after initiating license borrowing.

To prevent borrowing of additional licenses that are not needed, the borrow status should be cleared after checking out the licenses you need. As with initiating borrowing, clearing it is done with the lmborrow utility by issuing the command

lmutil lmborrow -clear

For example:

User command lmutil lmborrow -clear prints out the following message:

lmutil - Copyright (c) 1989-2017 Flexera Software LLC. All Rights Reserved.

Clearing LM_BORROW

This clears the LM_BORROW setting in the registry. It does not clear the local information about licenses if you have already used a borrowed license of the library. Clearing the borrow status does not return any borrowed licenses.

Checking Borrow Status🔗

To see which licenses are currently borrowed on your system, run the command

lmutil lmborrow -status

This will display all licenses currently borrowed, along with the end dates for the borrow periods.

For example:

User command lmutil lmborrow -status prints out the following message:

lmutil - Copyright (c) 1989-2017 Flexera Software LLC. All Rights Reserved.

Vendor Feature Version Expiration

________ ________ ________ ________

modelon ModelonBaseLib 2019.0323 12-Jul-18 23:58

Returning a borrowed license🔗

The borrowed licenses can be returned before the specified end date by running command

lmutil lmborrow -return [-c licfile] [-vendor name] feature

Table 2: Arguments for returning the license:

Argument Description
-c licfile Use the specified license files. In some configurations, the license file needs to be specified in order to return the borrowed license early. Ex: "C:\Users\<username>\AppData\Roaming\Modelon\Licenses\Server\<name of the license>.lic"
feature The name of the borrowed feature to be returned early. Use lmutil lmborrow ‐status to get a list of borrowed feature names. A single product can contain multiple features, which must be returned separately. Ex: ModelonBaseLib
-vendor name Vendor daemon that serves the licenses to be returned. Ex: modelon

For example:

Change the working directory to the directory of the library or feature to be returned.

User command lmutil lmborrow -return -c C:\Users\<username>\AppData\Roaming\Modelon\Licenses\Server\<name of the license>.lic ModelonBaseLib prints out the following message:

lmutil - Copyright (c) 1989-2017 Flexera Software LLC. All Rights Reserved.

Feature \"ModelonBaseLib\" returned successfully.

Note

The connection to the license server must exist to return borrowed licenses. If you try to return the borrowed license offline, it will show the below error message:

lmutil - Copyright (c) 1989-2017 Flexera Software LLC. All Rights Reserved.

lmborrow: Cannot connect to license server system. (-15,570)

Modelon Impact🔗

Borrowing a License🔗

The procedure for borrowing licenses for Modelon Impact or any Modelon product is the same as for libraries. The steps are mentioned below:

  1. Open command prompt
  2. Change the directory to license tool folder inside the Modelon Impact installation

cd C:\ModelonImpact-1.1\oct-dist\license_tools

  1. Initiate borrowing and state first with mentioned command

lmutil lmborrow modelon 23-Oct-2018 23:59

  1. This prints out the following message

C:\ModelonImpact-1.1\oct-dist\license_tools>lmutil lmborrow modelon 23-Oct-2018 23:59

lmutil - Copyright (c) 1989-2017 Flexera Software LLC. All Rights Reserved.

Setting LM_BORROW=23-oct-2018:modelon:23-Oct-2018:23:59

  1. Open Impact from Windows start menu. Open Chrome browser and create a local workspace.

  2. Once the Impact workspace opens, the required license features to run Impact will be borrowed:

    • IMPACT_BASE

    • OPTIMICA_BASE

    • IMPACT_LIBRARIES

Note

If steady state licensing is needed, a steady state analysis needs to be run in impact while connected to the license server to pull and borrow the license feature. The name of this feature is OPTIMICA_SS.

Options of the Vendor Daemon for IT Department🔗

The following options for the vendor daemon can be used to configure license borrowing. It should be declared in the options file.

Options File Setup🔗

Create the modelon.opt file using any text editor and place it in the directory that contains the license file used by the license server manager. Also edit the license file by adding the options file name adjacent to the vendor name as shown in below example:

SERVER xxx.xx.xx.xxx ANY
VENDOR modelon modelon.opt
USE_SERVER

BORROW_LOWWATER🔗

Specifies a number of licenses that cannot be borrowed. This will ensure that there are always at least BORROW_LOWWATER licenses to use on the license server.

The option syntax is:

BORROW_LOWWATER feature n

where, feature is the name of the limited feature and n is the number of non-borrowable licenses for that feature.

For example:

BORROW_LOWWATER ModelonBaseLib 1

means that the final seat of Modelon Base Library (license feature ModelonBaseLib) will not be available for borrowing. In other words, this ensures that at least 1 seat for feature ModelonBaseLib is available for users to check out from the license server.

EXCLUDE_BORROW🔗

Specifies a user or group that cannot borrow licenses for a certain feature. EXCLUDE_BORROW takes precedence over INCLUDE_BORROW, meaning that in case conflicting options for inclusion and exclusion are set, the ones for exclusion will be used.

The option syntax is:

EXCLUDE_BORROW feature type name

where, feature is the feature to prevent user(s) from borrowing, type is one of USER, HOST, DISPLAY, INTERNET, PROJECT, GROUP or HOST_GROUP, and name is the name of the type to be excluded.

For example:

EXCLUDE_BORROW ModelonBaseLib USER John

prevents user John from borrowing a license for the feature ModelonBaseLib.

INCLUDE_BORROW🔗

Specifies a user or group who can borrow licenses for a certain feature. If options specified here conflict with those for EXCLUDE_BORROW, the options for exclusion are used.

The option syntax is the same as for EXCLUDE_BORROW.

MAX_BORROW_HOURS🔗

Sets the longest allowed borrow period. The default for Modelon products is 420 hours (2.5 weeks), and it is only possible to specify a lower max value than this.

The option syntax is:

MAX_BORROW_HOURS feature n

where, feature is the feature to set a borrow period limit for, and n is the limit, in hours.

For example:

MAX_BORROW_HOURS ModelonBaseLib 10

means that the Modelon Base Library (license feature ModelonBaseLib) can't be borrowed for more than 10 hours.

Common Issues🔗

lmutil version < vendor daemon version🔗

If the lmutil utility tool has a lower version number than the modelon vendor daemon version, then the features will not be borrowed. You can check the version of lmutil with:

lmutil --v

And the vendor daemon version can be checked with the command:

lmutil lmstat -vd

A fix for this is to use a newer version of the lmutil utility tool. The 11.19 version of it can be found here (same as the latest version of the modelon vendor daemon):

Linux: https://downloads.modelon.com/transfer/update/FlexLM/license_tools_Lin_11.19.zip

Windows: https://downloads.modelon.com/transfer/update/FlexLM/license_tools_Win_11.19.zip

A password is required to access the files. Reach out to Modelon representative, or Send a request to support@modelon.com

Dymola and LM_BORROW environment variable🔗

If Dymola licenses has been borrowed in the past, then Dymola might have created an environment variable LM_BORROW that prevents borrowing of license features from other vendors. The fix for this is to delete the LM_BORROW environment variable and try to borrow the Modelon licenses again.