IWxWorkspace.DeglueShapes

Syntax

DeglueShapes(Shape1: IWxShape; Shape2: IWxShape);

Parameters

Shape1. The first workspace shape

Shape2. The second workspace shape.

Description

The DeglueShapes method separates two shapes.

Comments

Lines are also considered as shapes. If two shapes are connected with connection line, to disconnect them use the following algorithm: disconnect the first shape from connection line, then - the second one.

Example

Executing the example requires a workspace with the WSP identifier in repository. Two shapes are created on the workspace.

Add links to the Andy, Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    wsp: IWxWorkspace;
    Shapes: IWxShapes;
    Link: IWxLink;
Begin
    
// Get workspace
    mb := MetabaseClass.Active;
    wsp := mb.ItemById(
"WSP").Edit As IWxWorkspace;
    Shapes := wsp.Shapes;
    Link := wsp.AutoLinkShapes(Shapes.Item(
0), Shapes.Item(1));
    wsp.DeglueShapes(Shapes.Item(
0), Link);
    wsp.DeglueShapes(Shapes.Item(
1), Link);
    
//Save changes
    (wsp As IMetabaseObject).Save;
End Sub UserProc;

After executing the example, the link will be created between workspace shapes. After that shapes will be dissociated and the linking line remains unchanged on the workspace as a shape. The workspace will be saved to repository.

See also:

IWxWorkspace