Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

disabling the userName text box in Revit

OsamaElewa
Contributor

disabling the userName text box in Revit

OsamaElewa
Contributor
Contributor

Hello guys,

We have faced that some one used a user name of one of the architect and delete some elements, therefore we had to remodeling the deleted elements a gain.

so is there any way programmatically to disable the user name text box in Revit option? to avoid that any one might change the user name.

 

option.png

thanks a lot

O.Elewa

0 Likes
Reply
Accepted solutions (1)
472 Views
3 Replies
Replies (3)

RPTHOMAS108
Mentor
Mentor
Accepted solution

No access to that via API. There is probably a better alternative:

 

Subscribe to Application.DocumentOpening and within event handler check one of the following:

 

Application.IsLoggedIn, to verify user is signed into Autodesk account, when signed in I believe the Revit user name is fixed to that account.

or

Application.Username corresponds to the user via check against Windows account (you would have to have a company policy where Revit username matches Windows account username).

 

If you find these not to be correct you can cancel the DocumentOpening event to prevent opening.

 

In such a situation your addin file needs to be protected by file system permissions. If they are working remotely on their own machine that is probably not an option but then most things wouldn't be in that situation.

 

Have to say I've faced the opposite problem where people are not around and they've left worksets or elements borrowed. Mimicking their username to relinquish is then the only alternative to detaching and remaking the central. They didn't seem to consider this possibility with single sign in. 

 

0 Likes

OsamaElewa
Contributor
Contributor

Really Appreciate your response.

We do have permission policy the user work in the company LAN working on local files locally on their machines but the central models on Revit server.

 

the second option might be the solution, by checking the win user account name matches with the username in Revit option.

I will work on it thank you very much indeed for your reply.

 

please accept my best regards

#OsamaElewa

0 Likes

OsamaElewa
Contributor
Contributor

Really Appreciate your response.

We do have permission policy the user work in the company LAN working on local files locally on their machines but the central models on Revit server.

 

the second option might be the solution, by checking the win user account name matches with the username in Revit option.

I will work on it thank you very much indeed for your reply.

 

please accept my best regards

#OsamaElewa

0 Likes