Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
luismestre
594 Views, 4 Replies

Inventor defaults.xml - Collect machine user name on open .

Hi all

How do I edit the  line code in inventor defaults.xml  file ?

I want Inventor to collect the machine user name and added it in Options>General>user name .

Inventor defaults.xml file is shared within a team of  30 users.

 

Is this possible to do?

 

 

Regards

Luis Mestre

Luis Mestre
Oil&Gas Sr.3D & Subsea/Structural Designer
"Autodesk Autocad/Inventor & 3D Studio Max"
Email:lmsmestre@gmail.com
Ktomberlin
in reply to: luismestre

You can use notepad, but I have been using XML Notepad (http://xmlnotepad.codeplex.com/). Much easier for editing the configuration files, as well as parameter files you need to export, edit and import. Kevin
luismestre
in reply to: Ktomberlin

Hi Kevin

I use notepad as well to edit the files.

My question was about the code line.

Can you help?

 

Regards

Luis Mestre

Luis Mestre
Oil&Gas Sr.3D & Subsea/Structural Designer
"Autodesk Autocad/Inventor & 3D Studio Max"
Email:lmsmestre@gmail.com
Ktomberlin
in reply to: luismestre

Well this doesn't edit the xml directly, but it does change the user name in options.   This might accomplish what your trying to do. 

 

Code Snippet

WSHnet = CreateObject("WScript.Network")
UserName = WSHnet.UserName
UserDomain = WSHnet.UserDomain
objUser = GetObject("WinNT://" & UserDomain & "/" & UserName & ",user")
'get user name
UserFullName = objUser.FullName
ThisApplication.GeneralOptions.UserName = UserFullName

 

luismestre
in reply to: Ktomberlin

Hi 

Do I h;ave to run the code as a vb macro?

If so all users will be able to load the macro at start up,  correct?

Luis Mestre
Oil&Gas Sr.3D & Subsea/Structural Designer
"Autodesk Autocad/Inventor & 3D Studio Max"
Email:lmsmestre@gmail.com