DeglueConnectionPoints(Shape1: IWxShape; Index1: Integer; Shape2:IWxShape; Index2: Integer;);
Shape1. Shape
Index1. Index of the Shape1 connection point
Shape2. Shape used as a link. The following can be used as this shape: lines (IWxLink), figured arrows (IWxArrow), figured double arrows (IWxDoubleArrow).
Index2. Index of the Shape2 shape connection point.
The DeglueConnectionPoints method separates points of two objects.
If the connection was set using connecting lines (IWxStraightLink) - use the IWxWorkspace.DeglueShapes method to disconnect it.
Executing the example requires that repository contains a workspace with the WSP identifier.
Add links to the Andy, Drawing, Metabase system assemblies.
Sub Userproc;
Var
mb: IMetabase;
wsp: IWxWorkspace;
Link: IWxLink;
Shapes: IWxShapes;
Begin
// Get workspace
mb := MetabaseClass.Active;
wsp := mb.ItemById("WSP").Edit As IWxWorkspace;
Shapes := wsp.Shapes;
Link := Shapes.Item(2) As IWxLink;
wsp.DeglueConnectionPoints(Shapes.Item(0), 2, Link, 0);
wsp.DeglueConnectionPoints(Shapes.Item(1), 3, Link, 1);
//Save changes
(Wsp As IMetabaseObject).Save;
End Sub Userproc;
After executing the example line connection points are separated from shape connection points.
See also: