IWxShape.RemoveConnectionPoint

Syntax

RemoveConnectionPoint(Index: Integer);

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.

Example

Executing the example requires that repository contains a workspace with the WSP identifier containing several connected 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("WSP").Edit As IWxWorkspace;
    // Get shape
    Shape := wsp.Shapes.Item(0);
    // Remove the last added object connection point provided
    // 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;
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[
"WSP"].Edit() As IWxWorkspace;
    
// Get shape
    Shape := wsp.Shapes.Item[0];
    
// Remove the last added object connection point provided
    // 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;

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

See also:

IWxShape