Contains elements specifying the current lock settings for a shape.
Locking helps prevent inadvertent changes to the shape but does not prevent Microsoft Office Visio from resetting values in other circumstances. It also does not protect against changes made in the ShapeSheet window.
<Protection
[Del]>
</Protection>
Del
Optional boolean. A flag indicating whether the element has been deleted locally. A value of 1 indicates that the element was deleted locally.
Property | Value |
---|---|
Name | Protection |
Minimum Occurrences | 0 |
Maximum Occurrences | 1 |
Parent elements
Child elements
To protect a formula from being changed by Visio under any circumstances, use the GUARD function.
The Protection element is relevant only when contained in a Shape or StyleSheet element. It is ignored when contained in a DocumentSheet or PageSheet element.
The following code shows how to prevent Visio from changing a formula that sets the Width element equal to the Height element:
<Width F="GUARD(Height)">1</Width>
Protection section