Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

License Released When Offline

#1
Multiple developers are using multiple licenses of RoboDK where I work and having to remember to manually deactivate the license in order to free it up has caused all sorts of problems.  The license should just automatically deactivate when RoboDK is closed.  There is a timeout on licenses that have been offline, but it is an insane amount of time of around a month or so.  Sometimes a person in the office or working from home can't activate a license because some other computer that is turned off and not even running RoboDK didn't have its license deactivated when the computer was shut down.  If a license was activated on one PC and then there is a problem later on that prevents it from connecting to the license server (which is common), then that license is trapped in limbo until the connection problem is fixed.  It is also possible for two different users on the same computer to be using up two different licenses, which makes it hard to find which computer is consuming a license.
#2
Thank you for your feedback. I understand what you mean, however, it is currently not possible to implement an automatic deactivation on closing RoboDK.

The 30 day timout matches the duration of our default trials which we can easily provide if you have issues with your license or computer (lost computer, or you forgot it in a different location, etc).

We can easily group your licenses or split them into separate codes if that helps. I recommend you to contact us by email so we can better discuss.
#3
Why is it not possible to auto-disable when the program closes? When a Windows program closes there is an ON_CLOSING event that is sent before the program actually terminates which lets you run code prior to the shutdown. This could be used to run the same code that runs when the user clicks the "Deactivate" button on the license window.
#4
We are aware of the closing event. However, there are many things happening with the closing. Deactivating a license requires internet connection and it can take time to get the server response to make sure the handshaking with the license was done properly. 

Ideally the process of closing is as fast as possible. In practice, the license could get lost between the computer and the server during the handshake if we try to speed it up.

A workaround could be to implement a custom solution using the API. For example, a custom Add-in with a button to close RoboDK after having deactivated your license. This Add-in could run a script like this one:

Code:
import time
import robolink
RDK = robolink.Robolink()
# Check the user has a license and it is activated:
print("-- Activating RoboDK license --")
if RDK.Command("License", "Valid") == "0":
    RDK.Command("LActivate", "1")  # Request to activate the license (will trigger RoboDK to communicate with our server to retrieve a license)
    while True:
        print("Waiting...")
        time.sleep(0.2)
        if RDK.Command("License", "Valid") != "0":
            print("-> License activated!")
            break
else:
    print("License already activated")
print("RoboDK License name:")
print(RDK.Command("License", "Name"))
# ...
time.sleep(1)
print("")
#------------------------------
# Deactivate the license
RDK.Command("LActivate", "0")
print("-- Deactivating RoboDK license --")
while True:    
    time.sleep(0.2)
    print("Waiting...")    
    if RDK.Command("License", "Valid") == "0":
        print("-> License deactivated!")
        # Important to wait some time to make sure the request is received by the RoboDK server to make sure it has an effect
        # RDK.CloseRoboDK()
        break
print("Done")
print("RoboDK License name:")
print(RDK.Command("License", "Name"))

On Python, this would give you the following output:
Code:
-- Activating RoboDK license --
Waiting...
Waiting...
Waiting...
Waiting...
-> License activated!
RoboDK License name:
Professional (RoboDK)
-- Deactivating RoboDK license --
Waiting...
-> License deactivated!
Done
RoboDK License name:
Professional (RoboDK)
#5
Please consider adding this feature to allow users to release the License when closing. These days most people work on multiple PCs (work or home).
  




Users browsing this thread:
1 Guest(s)