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