Lock Tags to prevent manipulation

AskInga logo

Original Tip Date: May 2011

Lock Tags to prevent delete

You can easily delete tags accidentially and it is hard to get that corrected if you do not notice it immediately.
Use the following keyin (all in one go) to prevent manipulating or deleting tags accidentially.

mdl silentload selectby; selectby type all; selectby mode exclusive; selectby execute;change lock; mdl unload selectby; choose none

All tags are now locked - but can be edited still and also be moved with the cell (or any element) they are attached to.
If you then need to manipulate a single tag (e. g. because it needs to be moved as it interferes with an other element  To unlock all tags you can use the same keyin yet with  ...;change unlock;... instead.

Tags from cells are not locked after placement - even if you locked them in the cell library. If you create two buttons for the function you can just lock all tags in a file. To make sure you may even want to introduce a macro that runs the keyin when you open and/or close a file.
(although "Selectby" does allow not find tags the trick here is to invert the selection by "...mode exclusive")