Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get Autodesk ID or login Email

11 REPLIES 11
SOLVED
Reply
Message 1 of 12
Hubert_Los
291 Views, 11 Replies

Get Autodesk ID or login Email

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.

 

Tags (2)
11 REPLIES 11
Message 2 of 12
Jpfeifer5TC7R
in reply to: Hubert_Los

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. 

Message 3 of 12
JelteDeJong
in reply to: Jpfeifer5TC7R

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.

EESignature


Blog: hjalte.nl - github.com

Message 4 of 12
Hubert_Los
in reply to: Hubert_Los

I would like to grant permissions for specific functions to specific users. Therefore, I want to check what login they have.

@Jpfeifer5TC7R 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

Message 5 of 12
JelteDeJong
in reply to: Hubert_Los

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.

JelteDeJong_0-1722860655506.png

Unforunely for you that the windows login name (like @Jpfeifer5TC7R 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.

EESignature


Blog: hjalte.nl - github.com

Message 6 of 12
Hubert_Los
in reply to: Hubert_Los

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.


Message 7 of 12
AndrewHumiston
in reply to: Hubert_Los

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.

Message 8 of 12
WCrihfield
in reply to: JelteDeJong

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.

Application.LoginUserId 

Application.LoginUserName 

Application.UserName 

GeneralOptions.UserName 

System.Environment.UserName 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 9 of 12
Frederick_Law
in reply to: Hubert_Los


@Hubert_Los wrote:

I would like to grant permissions for specific functions to specific users.


Which functions you want to set permission?

Message 10 of 12
Rich-T
in reply to: Hubert_Los

Perhaps you could block a users access to a given iLogic rule?

Message 11 of 12
Hubert_Los
in reply to: Frederick_Law

@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

 

Message 12 of 12
WCrihfield
in reply to: Hubert_Los

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

EESignature

(Not an Autodesk Employee)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report