How to add the login name (edited by whom) into the Revit title block

How to add the login name (edited by whom) into the Revit title block

madhusudhana_rao
Contributor Contributor
1,484 Views
10 Replies
Message 1 of 11

How to add the login name (edited by whom) into the Revit title block

madhusudhana_rao
Contributor
Contributor

Hi All,

 

Can someone help me to set a variable name for adding Login Name in the revit title sheet.

Default "Filepath" parameter is not serving my requirement.

 

If anyone provide a small API on this, it would be greatly appreciated.

 

Madhu

0 Likes
1,485 Views
10 Replies
Replies (10)
Message 2 of 11

TripleM-Dev.net
Advisor
Advisor

Hi,

 

Is this Username Property what you're looking for?

 

- Michel

0 Likes
Message 3 of 11

madhusudhana_rao
Contributor
Contributor
Login name



Madhu


0 Likes
Message 4 of 11

TripleM-Dev.net
Advisor
Advisor

Hi,

 

What steps do you want to perform and when?

 

1. Get Login Name (Username = name AutoDesk account logged into Revit) or Windows Login Name?

2. Fill it into the "Drawn By" default sheet field or a custom one (own Shared parameter in title block and sheet views)

3. During print, creation of sheet, or button ??

 

- Michel

0 Likes
Message 5 of 11

dtpeter2901
Collaborator
Collaborator

I'd love to be able to get the Revit Username field into a title block as a custom parameter, just so I can put it in the margin and know who printed the sheet.  Just like a Plotstamp in Autocad would do.

I used to be able to do this with a file name, but we're on 360 so the local file path is no longer displayed.

0 Likes
Message 6 of 11

joshua.lumley
Advocate
Advocate

This is how you get the windows login name.

string userName = System.Security.Principal.WindowsIdentity.GetCurrent().Name.Split('\\').Last();

Easy. 

0 Likes
Message 7 of 11

RPTHOMAS108
Mentor
Mentor

If changing a parameter we point the finger at the last user that printed the sheet with the add-in not necessarily the last person that printed the sheet. Therefore also include suffixed date/time in same non-user modifiable parameter value (evidence for the defence).

 

If we really want to form a good prosecution/defence then we should encrypt the string value with a private key. It will appear to be gibberish in the printed sheet but when unencrypted will tell us the key facts above. Only we have the key so nobody can fabricate it. We then only have to decide where we store the private key, not in a .Net assembly!

0 Likes
Message 8 of 11

jaimeruiz9XSPN
Observer
Observer

I am looking for something similar.  When i spool in revit i have a spool sheet that says "Drawn By:" and i would like initials to be entered in automatically by who ever is spooling/logged in.  Could it read the autodesk login name and then assign that persons initials?  

0 Likes
Message 9 of 11

namunagetahun
Explorer
Explorer

I am looking for something similar. File path does not work for workshare model.

0 Likes
Message 10 of 11

joshZ4NNG
Explorer
Explorer

did you ever find a solution?

I want to make a checklist schedule within our template that has all of our things that must be completed per sheet. So then once someone checks it as done, it will show who checked it off based on their autodesk Id.

0 Likes
Message 11 of 11

butchgarris
Explorer
Explorer

I'm looking to do something similar as well.  Still no solutions?

0 Likes