IWxWorkspace.CreateCurveLink

Syntax

CreateCurveLink: IwxCurveLink;

Description

The CreateCurveLink method creates a rounded line in the workspace.

Comments

In order the created line becomes rounded, connect it with two points of shape.

Example

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

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

Sub Userproc;
Var
    mb: IMetabase;
    Wsp: IWxWorkspace;
    Shape: IWxShape;
    CLink: IWxCurveLink;
    First, Last: IGxPointF;
Begin
    // Get workspace
    mb := MetabaseClass.Active;
    wsp := mb.ItemById("WSP").Edit As IWxWorkspace;
    // Get shape and coordinates of two points
    Shape := wsp.Shapes.Item(0);
    If Shape.ConnectionPointsCount >= 2 Then
    First := Shape.ConnectionPoints(0);
    Last := Shape.ConnectionPoints(1);
    // Create rounded line that connects the first
    // and the second point
    CLink := wsp.CreateCurveLink;
    CLink.FirstPoint := First;
    CLink.LastPoint := Last;
    End If;
    //Save changes
    (Wsp As IMetabaseObject).Save;
End Sub Userproc;

After executing the example a straight line between the first and the second points of object is created. In order the line becomes rounded, connect it to the shape.

See also:

IWxShape