Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: adepreter on January 09, 2017, 03:54:28 am

Title: "Super-user" updating locked elements
Post by: adepreter on January 09, 2017, 03:54:28 am
Is there any way to update elements programmatically even when they are locked?
This is needed when a language gets migrated (Stereotype, tag name changes...).

As an alternative, how could we
- Save the locks to a file
- Release all locks
- Reload the locks from the file

Title: Re: "Super-user" updating locked elements
Post by: qwerty on January 09, 2017, 05:43:40 am
An operator can force unlock elements, so they are free to be changed. But AFAIK there is no restore that puts back the lock. Might be worth an investigation...

q.

P.S. You could write a script to save all t_object.style values which contain "Locked", do the unlock/change and then restore the style.
Title: Re: "Super-user" updating locked elements
Post by: adepreter on January 10, 2017, 05:44:49 am
Thank you. That sounds like a good idea. We will give it a try.
Title: Re: "Super-user" updating locked elements
Post by: qwerty on January 10, 2017, 10:08:54 am
You should be careful with those scripts. Make a backup and lock out normal users while running the script. Or take/swap the lock exclusively for the super-user.

q.