IWxWorkspace.CreateLink

Syntax

CreateLink: IWxLink;

Description

The CreateLink method creates a broken line.

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;
    Link: IWxLink;
    Shapes: IWxShapes;
Begin
    // Get workspace
    mb := MetabaseClass.Active;
    wsp := mb.ItemById("WSP").Edit As IWxWorkspace;
    // Get shape
    Link := wsp.CreateLink;
    Shapes := wsp.Shapes;
    Link.FirstPoint := Shapes.Item(0).ConnectionPoints(0);
    Link.LastPoint := Shapes.Item(1).ConnectionPoints(0);
    //Save changes
    (Wsp As IMetabaseObject).Save;
End Sub Userproc;

After executing the example a link between two objects is created.

See also:

IWxWorkspace