Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

How to add license without License manager?

0 votes
155 views
We would like to make it easier for our model users using Plecs Blockset.
Is there a possibility to check scriptbased (e.g. from Matlab) if the user has a valid license?
Additionally, how can we add also via script (without the license manager) a valid license if available locally but not yet properly activated.
asked Jan 31 by sgra (21 points)

1 Answer

+1 vote

To check out a license for PLECS, enter: 

[success, message] = plecs('checkout')

If the check-out succeeds, the return variable success will be set to 1 and message will be an empty string. Else, success will be set to 0 and message will contain a detailed error message. When called without left-hand side arguments, the command will raise a MATLAB error upon an unsuccessful check-out and else execute silently.

If you execute the command and a license is already checked out then the behavior is the same as the checkout succeeding.

answered Feb 12 by Bryan Lieblick (1,941 points)
Thanks a lot for the answer of the first part of my question.
Additionally, is there the possiblity to add the path to local a valid license via Matlab console instead of using the License Manager Gui?

PLECS searches certain directories for license files as documented here: https://www.plexim.com/support/installation_help/blockset (section "License File Location"). PLECS does not use activation for licenses.

...