Protection(ObjectProperty: WxObjectProperty): Boolean;
ObjectProperty. It determines the protected property.
The Protection property prevents object properties from being changed. If this property is set to True, the property specified as a parameter is protected from changes.
The property is set to False by default.
Executing the example requires that repository contains a workspace with the WSP identifier containing object.
Add links to the Andy, Metabase system assemblies.
Sub UserProc;
Var
mb: IMetabase;
wsp: IWxWorkspace;
Shape: IWxShape;
Begin
// Get repository
mb := MetabaseClass.Active;
wsp := mb.ItemById("WSP").Edit As IWxWorkspace;
Shape := wsp.Shapes.Item(0);
Shape.Protection(WxObjectProperty.EntityFree) := False;
(wsp As IMetabaseObject).Save;
End Sub UserProc;
After executing the example deletion of an object located in a workspace is disabled.
See also: