Assign(StyleFrom: IWxStyle);
StyleFrom. Style to be inherited.
The Assign method is used to inherit all properties of another style.
Executing the example requires that repository contains a workspace with the IWSTYLE identifier containing two shapes.
Add links to the Andy, Metabase system assemblies.
Sub UserProc;
Var
mb: IMetabase;
wsp: IWxWorkspace;
Shape, Shape1: IWxShape;
FormStyle: IWxStyle;
Begin
// Get workspace for editing
mb := MetabaseClass.Active;
wsp := mb.ItemById("IWSTYLE").Edit As IWxWorkspace;
wsp.BeginUpdate;
Shape := wsp.Shapes.Item(0);
Shape1 := wsp.Shapes.Item(1);
FormStyle := Shape.Style;
Shape1.Style.Assign(FormStyle);
wsp.EndUpdate;
(wsp As IMetabaseObject).Save;
End Sub UserProc;
After executing the example, the first object inherits the formatting of the second object.
See also: