IWxLink.InsertPoint

Syntax

InsertPoint(Number: Integer; Point: IGxPointF);

Parameters

Number. Index of line point before which a new point will be inserted

Point. Point coordinate.

Description

The InsertPoint method inserts a new point.

Example

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

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

Sub Userproc;
Var
    mb: IMetabase;
    ws: IWxWorkspace;
    Link: IWxLink;
    Point: IGxPointF;
    Shapes: IWxShapes;
Begin
    // Get workspace for editing
    mb := MetabaseClass.Active;
    ws := mb.ItemById("WSP").Edit As IWxWorkspace;
    Shapes := ws.Shapes;
    Link := ws.Shapes.Item(0As IWxLink;
    Point := New GxPointF.Create(Link.Points(1).X - 3, Link.Points(1).Y - 5);
    Link.InsertPoint(1, Point);
    (ws As IMetabaseObject).Save;
End Sub Userproc;

After executing the example a new point is added to the line that is placed after the initial line point.

See also:

IWxLink