IWxShape.RemoveConnectionPoint

Fore Syntax

RemoveConnectionPoint(Index: Integer);

Fore.NET Syntax

RemoveConnectionPoint(Index: integer);

Parameters

Index. Index of object connection point.

Description

The RemoveConnectionPoint method removes object connection point.

Comments

To get the number of object connection points, use the IWxShape.ConnectionPointCount property.

Fore Example

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

Add links to the Andy, Metabase system assemblies.

Sub UserProc;
Var
    mb: Imetabase;
    wsp: IWxWorkspace;
    Shape: IWxShape;
Begin
    // Get workspace for editing
    mb := MetabaseClass.Active;
    wsp := mb.ItemById("Workspace").Edit As IWxWorkspace;
    // Get shape
    Shape := wsp.Shapes.Item(0);
    // Remove the last added object connection point provided
    // that the number of points is not equal to 0
    If Shape.ConnectionPointsCount <> 0 Then
        Shape.RemoveConnectionPoint(Shape.ConnectionPointsCount - 1);
    End If;
    // Save changes
    (Wsp As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the connection point is removed from the shape.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Andy;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    wsp: IWxWorkspace;
    Shape: IWxShape;
Begin
    // Get workspace for editing
    mb := Params.Metabase;
    wsp := mb.ItemById["Workspace"].Edit() As IWxWorkspace;
    // Get shape
    Shape := wsp.Shapes.Item[0];
    // Remove the last added object connection point provided
    // that the number of points is not equal to 0
    If Shape.ConnectionPointsCount <> 0 Then
        Shape.RemoveConnectionPoint(Shape.ConnectionPointsCount - 1);
    End If;
    // Save changes
    (Wsp As IMetabaseObject).Save();
    End Sub;

See also:

IWxShape