I had an exciting weekend with ski tours under challenging weather conditions around Oberalppass, Sedrun-Andermatt, skiing on Piz Maler on Friday, piste in a snow storm on Saturday, and climbing Piz Cavradi via the Maighelshuette Sunday morning in splendid conditions, with 50 cm of fresh powder snow for the descent (photo album).
Here is today's Revit news for you:
- Trial period, floating license and the Entitlement API
- SketchUp Plugin for Grevit
- EMEA ADN team meeting in London
Trial Period, Floating License and the Entitlement API
Here is a question that came up in the Revit API discussion forum on how to set up a trial period for a custom add-in, answered by my colleagues Cyrille Fauvel and Virupaksha Aithal:
Question: I have an external application Revit add-in that I want to set a trial period on and sell on Autodesk AppStore, formerly known as Autodesk Exchange Apps.
My first question is:
Where should I store the trial period information?
I tried setting the
Registry.LocalMachine but Revit does not allow that because of the security problem.
My second question is about the Autodesk Entitlement API service:
Is it possible for a user to use one single permission account on multiple computers and pass the Entitlement API at the same time?
Answer: On the first question, where to store the trial period information:
That is completely up to you.
For instance, you can store it in your remote website database, in a local encrypted file, or anywhere else you like.
On the second question about the Autodesk Entitlement API service:
Yes, the entitlement API is a REST call to check whether the license is valid. It does not track the usage. You would have to implement your own service to track usage.
I assume that the scenario you wish to avoid is one single user, John, running the app from several different computers at the same time. To prevent that, you can use a floating license schema, like this:
John starts the app on computer A:
- You check the entitlement.
- You log a record on your website noting that computer A is currently using the license, e.g. storing its IP address, the time stamp, the license, etc.
- Every N minutes, refresh the record on your website.
- Lock the app if the Internet connection is lost.
- When John shuts down the app, inform your website and release the 'currently using' record for computer A.
If John starts the app on computer B, you proceed similarly, but:
- If your website says 'license already in use', give a grace period of N minutes.
- N minutes later:
- If the record for computer A gets updated, lock the app on Computer B.
- If the record for computer A does not get updated for some reason, e.g. crashed, give another N minutes grace period.
- N minutes later still: if there is still no change, take the license, and revoke it for computer A, which will lock down from now on.
If more than two computers are playing in this game, you may decide on stronger rules, set a priority on who can take the license, etc.
So, you need to implement your own solution to handle simultaneous use of the app on multiple machines.
For information on the current implantation entitlement API implementation, please refer to the following material – it is general in nature and thus holds good for Revit also:
- Entitlement API recording
- Sample application source code
- Implementing copy protection in your apps
- Entitlement API for desktop apps
I mentioned some additional resources in the recent discussion of the Autodesk reorganisation and Kean's move to Octo:
- Entitlement API for Revit Exchange Store Apps
- Exchange Apps resources – Entitlement API information
- Securing your AutoCAD app using .NET – Kean's sample showing how to use a REST API to check the user entitlement for your application via the Autodesk AppStore.
I hope that this helps and provides a final, complete and comprehensive overview.
SketchUp Plugin for Grevit
Last year, I mentioned the exciting open source project Grevit, a Rhino and Grasshopper app that enables assembling a BIM in Grasshopper, sending it to Revit or AutoCAD Architecture, and later dynamically updating it.
Its author, Max Thumfart, Senior Engineer at Thornton Tomasetti in the UK, points out that the latest Grevit release also adds support for SketchUp.
You can now build your BIM Model in either Grasshopper or SketchUp and send it to Revit or ACA, where it is translated into native elements like walls, floors and columns.
EMEA ADN Team Meeting in London
I am travelling to London tomorrow, for a short team meeting with my closest colleagues, the European ADN team.
We will discuss many exciting things, our internal organisation, efficiency, meetups, webinars, developing material and samples, best practices, individual achievements, upcoming events, other plans for the coming year, and last but not least all the APIs we support: Manufacturing, Fusion, BIM, BIM360 Docs, the View and Data API, AutoCAD I/O, ReCap, Spark, EXPO, Shotgun, Stingray, Maya I/O, 3ds Max I/O, Rendering, etc. – all handled by just four people in this part of the world!