IWxWorkspace.GlueConnectionPoints

Syntax

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

GlueConnectionPoints(Shape1: Prognoz.Platform.Interop.Andy.IWxShape; Index1: integer; Shape2: Prognoz.Platform.Interop.Andy.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 repository contains a workspace with the WSP identifier.

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

Sub Userproc;
Var
    mb: IMetabase;
    wsp: IWxWorkspace;
    Shapes: IWxShapes;
    StrLink: IWxStraightLink;
Begin
    // Get workspace
    mb := MetabaseClass.Active;
    wsp := mb.ItemById("WSP").Edit As IWxWorkspace;
    Shapes := wsp.Shapes;
    //
    StrLink := wsp.CreateStraightLink;
    wsp.GlueConnectionPoints(Shapes.Item(0), 2, StrLink, 0);
    wsp.GlueConnectionPoints(Shapes.Item(1), 3, StrLink, 1);
    //Save changes
    (wsp As IMetabaseObject).Save;
End Sub Userproc;
Imports Prognoz.Platform.Interop.Andy;
Imports Prognoz.Platform.Interop.Drawing;

 
Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    wsp: IWxWorkspace;
    Shapes: IWxShapes;
    StrLink: IWxStraightLink;
Begin
    
// Get workspace
    mb := Params.Metabase;
    wsp := mb.ItemById[
"WSP"].Edit() As IWxWorkspace; ;
    Shapes := wsp.Shapes;
    
//
    StrLink := wsp.CreateStraightLink();
    wsp.GlueConnectionPoints(Shapes.Item[
0], 2, StrLink, 0);
    wsp.GlueConnectionPoints(Shapes.Item[
1], 3, StrLink, 1);
    
//Save changes
    (wsp As IMetabaseObject).Save();
End Sub;

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

See also:

IWxWorkspace