Entitlement API are used in getting Autodesk 360 users account information. It also helps in determining genuinely of users. Whether the user is downloaded from App Store or copied from somewhere else.
In previous version of Inventor (2016 & 2017), Entitlement API is provided by AdWebServices.dll and is in C++. It is explained in this post.
In Inventor 2018, Entitlement API is provided by a .net Wrapper called "AddinNETFramework.AdWebServicesWrapper.dll"
The .net Wrapper is available at installed location (C:\Program Files\Autodesk\Inventor 2018\Bin)
So, in order to access Entitlement API, AddReference "AddinNETFramework.AdWebServicesWrapper.dll" from installed location to the application.
Sample C# code.
using Autodesk.WebServices;
CWebServicesManager mgr = new CWebServicesManager();bool isInitialize = mgr.Initialize();
if (isInitialize == true)
{string userId = "";
mgr.GetUserId(ref userId);
string username = "";
mgr.GetLoginUserName(ref username);
}
Sample VB.net code.
Imports Autodesk.WebServices
Dim webServiceMgr As CWebServicesManagerwebServiceMgr = New CWebServicesManager()
Dim isWebServiceInitialized As Boolean
isWebServiceInitialized = webServiceMgr.Initialize()
If isWebServiceInitialized = True Then
Dim userId As String = "" webServiceMgr.GetUserId(userId)
Dim userName As String = "" webService
Mgr.GetLoginUserName(userName)
End If
Note: Changes in entitlement API for Inventor 2020 is blogged in this post.