IWxWorkspace.GlueConnectionPoints

Syntax

GlueConnectionPoints(Shape1: IWxShape; Index1: Integer; Shape2: IWxShape; Index2: Integer;);

Parameters

Shape1. Shape

Index1. Index of the Shape1 connection point

Shape2. A shape used as a link. This shape can be: lines (IWxLink), connecting lines (IWxStraightLink), figured arrows (IWxArrow), figured double arrows (IWxDoubleArrow);

Index2. Index of the Shape2 connection point.

Description

The GlueConnectionPoints method joins points of two objects.

Example

Executing the example requires that the repository contains a workspace with the WSP identifier.

Add links to the Andy, Drawing, Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    ws: IWxWorkspace;
    StrLink: IWxStraightLink;
    Shapes: IWxShapes;
Begin
    // Get workspace for editing
    mb := MetabaseClass.Active;
    ws := mb.ItemById("WSP").Edit As IWxWorkspace;
    // Connect the second shape with the first one
    StrLink := ws.CreateStraightLink;
    Shapes := ws.Shapes;
    ws.GlueConnectionPoints(Shapes.Item(0), 2, StrLink, 0);
    ws.GlueConnectionPoints(Shapes.Item(1), 3, StrLink, 1);
    (ws As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the defined objects are connected with a connecting line.

See also:

IWxWorkspace