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: 

Code required to get Windows user login name

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
jlane
665 Views, 4 Replies

Code required to get Windows user login name

What is the iLogic code (or VB.NET code) I could use within a rule to get the Windows user login name?  Similar to AutoLISP's (getvar "LOGINNAME").

 

Thx!

4 REPLIES 4
Message 2 of 5
ekinsb
in reply to: jlane

.Net supports getting the username but it's probably easier to just use Inventor's API.  This will get it:

 

ThisApplication.UserName


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 3 of 5
NachitoMax
in reply to: ekinsb

Hi

If you want the windows user login name, you can use

dim sUserName As String
SUserName = Environ("Username")

Cheers

Nacho

Automation & Design Engineer

Inventor Programmer (C#, VB.Net / iLogic)


EESignature


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.


Message 4 of 5
jlane
in reply to: ekinsb

Thanks Brian, that worked!

Message 5 of 5
jlane
in reply to: NachitoMax

Thanks nmjshaw150, that worked too!

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

Post to forums  

Autodesk Design & Make Report