Document Changed Event With Username

Document Changed Event With Username

atk_vinay.krishna
Enthusiast Enthusiast
406 Views
1 Reply
Message 1 of 2

Document Changed Event With Username

atk_vinay.krishna
Enthusiast
Enthusiast

Dear all,

 

Is there any codes are there for above mentioned subject, This is very much helfull to track the model.Plese help me on the same.

 

Thanks & Regards

Vin.k

0 Likes
407 Views
1 Reply
Reply (1)
Message 2 of 2

augusto.goncalves
Alumni
Alumni
Hi,

If you mean the Windows user name, try Environment.UserName

Now if you mean Revit user name, try Application.UserName

>>>>
void ControlledApplication_DocumentChanged(object sender, Autodesk.Revit.DB.Events.DocumentChangedEventArgs e)
{
string userName = e.GetDocument().Application.Username;
}
<<<<
Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
0 Likes