IWxLink.PointCount

Syntax

PointCount: Integer;

PointCount: integer;

Description

The PointCount property returns the number of line points.

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;
    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;
    Link.RemovePoint(Link.PointCount - 
2);
    (ws 
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;
    ws: IWxWorkspace;
    Link: IWxLink;
    Shapes: IWxShapes;
Begin
    
// Get workspace for editing
    mb := Params.Metabase;
    ws := mb.ItemById[
"WSP"].Edit() As IWxWorkspace;
    Shapes := ws.Shapes;
    Link := ws.Shapes.Item[
0As IWxLink;
    Link.RemovePoint(Link.PointCount - 
2);
    (ws 
As IMetabaseObject).Save();
End Sub;

After executing the example a line point next to the final one is deleted.

See also:

IWxLink