Is it possible to get an Autodesk ID from Inventor?
I tried to use "AddinNETFramework.AdWebServicesWrapper" in an external application, but the .dll file won't load.
Solved! Go to Solution.
Solved by JelteDeJong. Go to Solution.
Solved by JelteDeJong. Go to Solution.
I used internal usernames passed into a case statement. Most likely there is a better way of getting this information.
Sub SelectNameCase(ByRef ThreeLetters As String)
Dim username As String = System.Environment.UserName
'Dim username As String = "Test"
'MessageBox.Show(username)
Select Case username
Case "NameA"
ThreeLetters = "ABC"
Case "NameB"
ThreeLetters = "ABC"
Case "NameC"
ThreeLetters = "ABC"
Case "NameD"
ThreeLetters = "ABC"
Case "Name E"
ThreeLetters = "ABC"
End Select
End Sub
Not sure what you're attempting to use the usernames for, but this allowed me to set the initials on many of my sketched symbols predicated on who the active user creating them was.
try this:
Dim userName = ThisApplication.UserName
Dim userNameLogin = ThisApplication.LoginUserName
Dim userId = ThisApplication.LoginUserId
Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Blog: hjalte.nl - github.com
I would like to grant permissions for specific functions to specific users. Therefore, I want to check what login they have.
@J_Pfeifer_ Unfortunately this won't work in my case.
@JelteDeJong I can only get "ThisApplication.UserName", but there is no data there.
Maybe you know another solution how to give permissions to specific people? Preferably offline
According to this article these properties are introduced in Inventor 2023. I if you are working with a lower version then I guess you cant use them.
If I remember correct the "Application.UserName" is the name that you will find in your application options. Not very save I expect.
Unforunely for you that the windows login name (like @J_Pfeifer_ suggested) is not working for you because I dont know any other solutions.
Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Blog: hjalte.nl - github.com
Yes, I can't use an editable element like "ThisApplication.UserName". So I need to add online login. Thank you for your response. I will wait some time for acceptance, maybe someone else will come up with an idea to solve this problem.
Good Morning.
Could you pass the user login name against a list? there is a way to access the login name for the application @
application.userloginid
if your company had the user login id set to the previous part of the email i.e. JDoe@Somecompany.com, and JDoe was set to the Autodesk user login you could do what you are thinking of that way. i hope this idea spurs something for you.
The actual one you had in mind (the one we see in the Application Options, on the General tab, is this one:
ThisApplication.GeneralOptions.UserName
The one similar to that you were pointing to sounds like it is just a local copy that property that Inventor makes for itself automatically, for its own uses. So, as far as I know, they should always have the same value.
Wesley Crihfield
(Not an Autodesk Employee)
@Hubert_Los wrote:I would like to grant permissions for specific functions to specific users.
Which functions you want to set permission?
@AndrewHumiston
I can't get "application.userloginid", in version 2023 "ThisApplication.LoginUserId" works, but I need it for a lower version
@WCrihfield
I checked this and "ThisApplication.GeneralOptions.UserName" is not the same as "ThisApplication.LoginUserId".
@Frederick_Law
My function in the add-ins that checks some information in the model
@Rich-T
It is add-ins
The best way to do this is "ThisApplication.LoginUserId", but only as of version 2023. I will use computer information in lower functions, until Inventor is upgraded to a higher version
That was not the one I was suggesting as being the same, but I guess I was not that specific in my previous post.
I was referring to the following quote from Message 5 above:
"If I remember correct the "Application.UserName" is the name that you will find in your application options. Not very save I expect."
Both the older properties: Application.UserName property and Application.GeneralOptions.UserName property appear to always have the same value. We have always set the value of Application.GeneralOptions.UserName (the one in the Application Options / General tab) to the value we want to see in the TitleBlocks of all our drawings. We prefer to use a different formatted UserName in our drawings & CAD files than the UserName of our Windows operating system sign-in credentials.
Wesley Crihfield
(Not an Autodesk Employee)
Can't find what you're looking for? Ask the community or share your knowledge.