Inventor 2018 - Entitlement API Changes?

Inventor 2018 - Entitlement API Changes?

Anonymous
Not applicable
629 Views
1 Reply
Message 1 of 2

Inventor 2018 - Entitlement API Changes?

Anonymous
Not applicable

Has something changed in the Inventor 2018 API for retrieving the Autodesk 360 account name and/or the entitlement API? What worked in 2016 and 2017 now doesn't work in 2018.

 

 

0 Likes
Accepted solutions (1)
630 Views
1 Reply
Reply (1)
Message 2 of 2

chandra.shekar.g
Autodesk Support
Autodesk Support
Accepted solution

Hi Thomas,

 

In Inventor 2018, Autodesk 360 account name can be accessed through Entitlement API.

 

The Entitlement API can be accessed from "AddinNETFramework.AdWebServicesWrapper.dll" at installed location (C:\Program Files\Autodesk\Inventor 2018\Bin)

 

So, in order to access API, AddReference "AddinNETFramework.AdWebServicesWrapper.dll" from installed location to the application.

 

Please find the sample VB.Net and C# code in the following.

 

VB.net

 

Imports Autodesk.WebServices

Dim webServiceMgr As CWebServicesManager webServiceMgr = New CWebServicesManager() Dim isWebServiceInitialized As Boolean isWebServiceInitialized = webServiceMgr.Initialize() If isWebServiceInitialized = True Then
Dim userId As String = "" webServiceMgr.GetUserId(userId) Dim userName As String = "" webServiceMgr.GetLoginUserName(userName)
End If

C#

 

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); }

Please feel free to contact if there is any doubt.

 

If solves your problem, click on "Accept as solution" / Give a "Kudo"

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network