[Integration Kit Contents] [Integration Kit What's New] [Integration Kit Function Index] [More Documentation] [PTC]

Licensing

sd-define-licensing-module
sd-license-expiry-time
sd-formatted-license-expiry-time
sd-license-server
sd-module-activate
sd-module-deactivate
sd-module-activation-event
sd-module-deactivation-event
sd-module-active-p

sd-announce-license-free-module
sd-license-free-module-p
sd-license-free-module-activate
sd-license-free-module-deactivate
sd-license-free-module-activation-event
sd-license-free-module-deactivation-event
sd-license-free-module-active-p

sd-set-idle-behavior
sd-set-hold-time

SD-DEFINE-LICENSING-MODULE  [function]

(sd-define-licensing-module product-name partner-key product-key)
Description:
Defines a new licensing module having the given name (which must be unique). The two keys are used to calculate the secret product key for the new module.
Note: If this function returns nil you have to abandon the activation of your module. If you don't do that, your module will probably utilize an already defined and activated license without requesting the license which is supposed to be drawn.

Parameters:
product-name {STRING} - the unique name of the new liensing module
partner-key {STRING} - the partner key. It must be 8 characters long.
product-key {STRING} - the product key. It must be 8 characters long.

Return Value:
t - the module is successfully defined
nil - Usually if the product-name already exists. Use sd-inq-error-obj to get more information about the failure.
See important note above as well!

Example:
(sd-define-licensing-module "VAR-ADD-ON-PRODUCT" "VAR1XYZ!" "PRODSECK")

Function Index Top of Page

SD-LICENSE-EXPIRY-TIME  [function]

(sd-license-expiry-time)
Description:
Returns the Universal Time (see the Common Lisp reference manual) at which Creo Elements/Direct Modeling will start complaining about an expired license. This is 0 when no time-bombed licenses are active; otherwise it is the earliest expiry time of all active time-bombed licenses.

Parameters:

Return Value:
license-expiry-time {INTEGER} - the Universal Time of an expired license

Example:
(sd-license-expiry-time)  => 0

Function Index Top of Page

SD-FORMATTED-LICENSE-EXPIRY-TIME  [function]

(sd-formatted-license-expiry-time format)
Description:
Returns a string corresponding to the time reported by sd-license-expiry-time. The string is generated by passing the time and the format string to strftime(3c). The main purpose of this function is to generate a correctly localized representation of the expiry time.
Note: If sd-license-expiry-time returns 0, this function will not return a meaningful result.

Parameters:
format {STRING} - the format string for strftime(3c)

Return Value:
formatted-license-expiry-time {STRING} - the formatted license expiry time

Example:
(unless (zerop (sd-license-expiry-time))
  (display (sd-formatted-license-expiry-time
           "WARNING: The license for Creo Elements/Direct Modeling will expire %c.")))

Function Index Top of Page

SD-LICENSE-SERVER  [function]

(sd-license-server hostname operation)
Description:
Connect to the named license server.

Parameters:
hostname {STRING} - the name of a host running an MEls license server
operation {KEYWORD} - :connect

Return Value:
t - success
nil - error

Function Index Top of Page

SD-MODULE-ACTIVATE  [function]

(sd-module-activate modulename)
Description:
If the given module is not already active, the function tries to obtain a license for it. If the license is granted, this function also triggers an event corresponding to the module (see sd-module-activation-event).

Parameters:
modulename {STRING} - the name of the module to activate

Return Value:
t - the license has been granted (or if the module was already active)
nil - otherwise

Example:
(sd-module-activate "VAR-ADD-ON-PRODUCT")

Function Index Top of Page

SD-MODULE-DEACTIVATE  [function]

(sd-module-deactivate modulename)
Description:
Deactivates the module with name modulename and releases its license. On successful deactivation the sd-module-deactivation-event gets processed.
If the module was deactivated already, nothing happens.

Parameters:
modulename {STRING} - the name of the module to deactivate

Return Value:
t - the module could be deactivated (or was deactivated already)
nil - otherwise (e.g. no module with such name)

Function Index Top of Page

SD-MODULE-ACTIVATION-EVENT  [function]

(sd-module-activation-event modulename)
Description:
For each of the licensed module, there is a corresponding activation event. Its name is returned by this function. This event is triggered at most once (when the corresponding module becomes active).

Parameters:
modulename {STRING} - the name of the module

Return Value:
event {STRING} - activation event name

Function Index Top of Page

SD-MODULE-DEACTIVATION-EVENT  [function]

(sd-module-deactivation-event modulename)
Description:
Returns the name of the deactivation event. With deactivation of the module with name modulename this event gets triggered.

Parameters:
modulename {STRING} - the name of the module

Return Value:
event {STRING} - deactivation event name

Function Index Top of Page

SD-MODULE-ACTIVE-P  [function]

(sd-module-active-p modulename)
Description:
Inquires whether the module with name modulename is active or not. That means the user got a license for a certain Creo Elements/Direct Modeling module which he has requested.

Parameters:
modulename {STRING}
Name of the module. List of valid module names:
  • "SURFACING"
  • "STEP"
  • "STL"
  • "SHEETADVISOR"
  • "EELINK"
  • "ANNOTATION"

Return value:
t - if module is active
nil - otherwise

Function Index Top of Page

SD-ANNOUNCE-LICENSE-FREE-MODULE  [function]

(sd-announce-license-free-module modulename)
Description:
Announces a new module with name modulename as license free module.

Parameters:
modulename {STRING} - name of module to announce

Return Value:
t - always

Function Index Top of Page

SD-LICENSE-FREE-MODULE-P  [function]

(sd-license-free-module-p modulename)
Description:
Checks if modulename is announced as license free module.

Parameters:
modulename {STRING} - name of module to check

Return Value:
t - module is a license free module
nil - module is not a license free module

Function Index Top of Page

SD-LICENSE-FREE-MODULE-ACTIVATE  [function]

(sd-license-free-module-activate modulename)
Description:
If the given module is not already active, the function activates the module by triggering its corresponding activation event (see sd-license-free-module-activation-event).

Parameters:
modulename {STRING} - the name of the module to activate

Return Value:
t - always

Example:
(sd-license-free-module-activate "PEWMSD")

Function Index Top of Page

SD-LICENSE-FREE-MODULE-DEACTIVATE  [function]

(sd-license-free-module-deactivate modulename)
Description:
Deactivates the license free module with name modulename. On successful deactivation the sd-license-free-module-deactivation-event is processed.
If the module was deactivated already, nothing happens.

Parameters:
modulename {STRING} - the name of the module to deactivate

Return Value:
t - always

Function Index Top of Page

SD-LICENSE-FREE-MODULE-ACTIVATION-EVENT  [function]

(sd-license-free-module-activation-event modulename)
Description:
Returns the activation event name of the license free module with name modulename to be used to subscribe and unsubscribe custom functions.

Parameters:
modulename {STRING} - the name of the module

Return Value:
event {STRING} - activation event name

Function Index Top of Page

SD-LICENSE-FREE-MODULE-DEACTIVATION-EVENT  [function]

(sd-license-free-module-deactivation-event modulename)
Description:
Returns the name of the deactivation event. With deactivation of the module with name modulename this event gets triggered.

Parameters:
modulename {STRING} - the name of the module

Return Value:
event {STRING} - deactivation event name

Function Index Top of Page

SD-LICENSE-FREE-MODULE-ACTIVE-P  [function]

(sd-license-free-module-active-p modulename)
Description:
Inquires whether the license free module with name modulename is active or not.

Parameters:
modulename {STRING}
Name of the module. List of valid module names:
  • "PEWMSD" - DesignManagement
  • "REMOTE_CALC" - Remote Server Update

Return value:
t - if module is active
nil - otherwise

Function Index Top of Page

SD-SET-IDLE-BEHAVIOR  [function]

(sd-set-idle-behavior behavior)
Description:
By default Creo Elements/Direct Modeling checks licenses all the time even if it is in idle state. If you call this function with :on as parameter you tell Creo Elements/Direct Modeling to release the used licenses after a certain period of hold time (see sd-set-hold-time) if Creo Elements/Direct Modeling is idle (no mouse or keyboard interaction) during that time. If during that time the license server does not receive any requests from Creo Elements/Direct Modeling, the licenses used by this Creo Elements/Direct Modeling can be granted to another Creo Elements/Direct Modeling.

Parameters:
behavior {KEYWORD [:off]} - :on or :off
Switch release of licenses in idle state on or off

Return value:
t - success
nil - otherwise

Function Index Top of Page

SD-SET-HOLD-TIME  [function]

(sd-set-hold-time hold-time)
Description:
Sets the number of minutes a license server will hold a license locked if Creo Elements/Direct Modeling does not check licenses in that time. Each time Creo Elements/Direct Modeling checks licenses, the hold timer is reset and will hold the license for that number of minutes.
To enable release of licenses in idle state you need to call (sd-set-idle-behavior :on).
The license hold time applies for all licenses granted to Creo Elements/Direct Modeling.

By using this function you can also affect the license server check time, because the license server check time is correlative with the license hold time. Below you find the formula how to calculate the license server check time:

   LsChkTime = ( hold-time * 60 ) / 2  ( in seconds )
Note:
If LsChkTime exceeds 10 minutes a value of 10 minutes will be set.
If LsChkTime falls below 1 minute a value of 1 minute will be set.

If hold-time exceeds 255 minutes a value of 255 minutes will be set.
If hold-time falls below 15 minutes a value of 15 minutes will be set.

Parameters:
hold-time {NUMBER [180]} - new licenses hold time in idle mode

Return value:
hold-time - the hold-time set previously

[Integration Kit Contents] [Integration Kit What's New] [Integration Kit Function Index] [More Documentation] [PTC]
© 2024 Parametric Technology GmbH
(a subsidiary of PTC Inc.), All Rights Reserved