Lock elements with password

Hello,

I was wondering if it is possible to lock elements in central model to stop others delete / modify them without being able to provide a password.

For instance I want to lock the linked models, so no one can move, remove or modify the room bounding seetings etc, unless the have the password, which was used to lock them. Is this even possible to achive using API?

Thanks

1 Like

@hoss53 ,

you can give your link on a specific workset and “own” it. f.e.

i am not sure if PyRevit is nessercary for that.

1 Like

I agree with @andreasd811
no need to reinvent the wheel

alternatively, to really tell you what is possible to implement, a hook attached to either: doc-changed event, specific link command, iupdater (I would advise against)

Have thought about this solution, only issue is it will be limited to one person, and if the person who owns the workset is off or not in office …
I was hoping for an option where two or three people will be able to make changes providng they have a predefiend password.
I have found this addin that Lock-It with Password(Admin) that seems to offer the solution I am looking for.

1 Like

@hoss53 ,

you can use some kind of workset@myMail.com user 3 people know the log.

No sure I understand your suggestion, could you please explain a bit more.
Do you mean we create an account “workset@myMail.com” and share credential for this account with trusted users?
Thanks

In general, better to train/teach people, than trying to lock everything in a model.
Long term outcome: you get kick ass coworkers!

3 Likes

Do all of these:

  1. Dedicated workset for each link.
  2. Pin each link
  3. Create an option set for links and grids

If the links still get moved even after moving to option set, it might be malicious intent. Depending on how well they know revit, they may not even know about option sets and have no idea why they can’t select the link anymore

The issue with a password app, is that all you have to do is unload the app and you have full access to everything again. So, you would have to lock down a lot of the stuff on the system to make sure the app always gets loaded.

I’d have more fun with this. Copy all locked elements to another file in the background. Let the users edit and delete elements. As soon as the change happens - poof! It is back the way it was. Copied from the background document. Using the background document would also provide a backup if someone were to unload the app. As soon as the app was reloaded - all the locked objects would be back.

1 Like