Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Last Saved By"

Status
Not open for further replies.

bri011

Electrical
Sep 11, 2006
20
0
0
US
I want to change the "Last Saved By" name that is used by SolidWorks. I believe that this was registered in SolidWorks as the name of the logged in user during installation. Does anybody know where this is saved so that I may change it? I guess the registry; but I couldn't find it. Any ideas?

Thanks,

Brian
 
Replies continue below

Recommended for you

Sounds like someone needs to cover his tracks! What manner of misdeed are you trying to hide?[censored]

In my years of probing the depths of SW's API, I have not found a way to access this. It is a file parameter that is hidden from public write access.

From what I can tell, this property is automatically written into the file when it is saved. The Windows user name of the active account is written to the file, with no options to adjust this behavior.

Even if you manage to change the "Last saved by", each feature also records the user name of its creator and last modifier.

[bat]I could be the world's greatest underachiever, if I could just learn to apply myself.[bat]
-SolidWorks API VB programming help
 
Brian,
What is your goal? Do you want to change how SW reports the "last saved by" for existing files, or do you want to change the "installed user" or whatever so that future files get stamped with the right name?
 
I wrote a macro to add revisions. Each revision line gets the initials of the person who made the revision. Those initials are pulled (in VBA) from the file summary info "Saved By":

swModel.SummaryInfo(swSumInfoSavedBy)

In order for it to work the way I want, my user name must be in the format "BMears" (for Brian Mears). I pull the name from the summary info and truncate all but the first two characters (leaves "BM").

I started a new job and they set my user name as "Brian M", so my initials show as "Br".

I have a hunch that SolidWorks writes the active Windows user name somewhere in the registry during installation. I found (and changed) the user name in Windows, but it did not affect SolidWorks.

Blah blah blah. After all that, any ideas? Thanks,

Brian
 
The real fix is to establish a standard user name, that is the root cause of your problem. If that isn't possible then how about pulling the name from somewhere else (not as subjective)...like environ ("USERID")?

Ken
 
Another option might be to create a look up table for your program that has user name - initials pairs. You can create a pair for each operator. That way your code will not rely on having user names in a specific format. However, you will need to modify the table when you get new users. This might be easier if the table was in an external file.

Eric
 
Status
Not open for further replies.
Back
Top