Count: Integer;
The Count property returns number of workspace styles.
Executing the example requires that repository contains a workspace with the IWSTYLE identifier containing several styles.
Add links to the Andy, Metabase system assemblies.
Sub UserProc;
Var
mb: IMetabase;
ws: IWxWorkspace;
Sts: IWxStyles;
style: IWxStyle;
Begin
// Get workspace for editing
mb := MetabaseClass.Active;
ws := mb.ItemById("IWSTYLE").Edit As IWxWorkspace;
Sts := Ws.Styles;
style := Sts.Item(Sts.Count - 1);
style.Delete;
(ws As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the last style is deleted from the list.
See also: