New·

Implementing Trials and Floating Licenses with Entitlement API

Learn how to manage trial periods and floating-seat licensing for your AutoCAD plugin using Autodesk’s Entitlement API.
Aa Ahmed2 min read

In this post, we’ll cover two important licensing strategies supported by Autodesk’s Entitlement API: trial periods and floating seats. You’ll learn how to implement expiration logic, seat tracking, and user-friendly enforcement inside your plugin.

Trial and floating license diagram

1. Time-Based Trial Licensing

A trial license grants temporary access to your plugin. You can control this by setting the expiration in the entitlement record.

{
  "userId": "[email protected]",
  "productId": "com.mycompany.plugin",
  "status": "Trial",
  "expiration": "2025-05-15T23:59:59Z"
}

C# Example

var result = await _client.ValidateTokenAsync(token);
if (!result.IsValid || result.Expiration < DateTime.UtcNow)
{
    ShowMessage("Trial expired. Please purchase a full license.");
    DisablePlugin();
}

💡 Store the Expiration timestamp and alert users 3–5 days before expiry.

2. Floating License Pools

Floating licensing allows a limited number of seats to be shared among users. The Entitlement API doesn’t manage seats by default — you’ll need to track usage on your end.

Activation Logic

var machineId = Environment.MachineName;
var result = await _client.ActivateAsync(token, machineId);
if (!result.Success)
{
    Log("No floating seats available");
    ShowMessage("All seats are currently in use.");
    DisablePlugin();
}

Deactivation on Exit

Ensure deactivation happens when users close AutoCAD:

await _client.DeactivateAsync(token, machineId);

Best Practices

  • Bind seats to a machine/user ID.
  • Track active sessions in your backend.
  • Use a timeout window to auto-release stuck seats.

3. Offline & Grace Periods

Allowing users to work offline after first activation improves UX.

if (!Online())
{
    if (LastValidLicense < 14 days ago)
        AllowAccess();
    else
        PromptReconnect();
}
💡 Tip: Store encrypted tokens locally and refresh them securely when online.

Intro to Entitlement API

Concepts and API overview.

Test Data & Simulation

Craft realistic licensing scenarios.

Hybrid Lisp + .NET

Scripted license control from AutoLISP.

Official API PDF

Autodesk’s full entitlement reference.

Next Steps

In Post #7, we’ll wrap up this series with tips on securing your plugin, using HTTPS properly, and cross-product strategies using Revit’s licensing model.