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 the repository contains a workspace with the WSP identifier that contains two shapes.
Add links to the Andy and 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: