IWxShape.AddConnectionPoint

Fore Syntax

AddConnectionPoint(Point: IGxPointF): Integer;

Fore.NET Syntax

AddConnectionPoint(Point: Prognoz.Platform.Interop.Drawing.IGxPointF): integer;

Parameters

Point. Object connection point.

Description

The AddConnectionPoint method adds an object connection point.

Comments

The coordinates passed by the user are automatically corrected to fit the border of IWxShape.

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, Drawing, Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    wsp: IWxWorkspace;
    Shape: IWxShape;
    Point: IGxPointF;
Begin
    // Get workspace for editing
    mb := MetabaseClass.Active;
    wsp := mb.ItemById("Workspace").Edit As IWxWorkspace;
    // Get shape
    Shape := wsp.Shapes.Item(0);
    // Create a point with coordinates
    Point := New GxPointF.Create(1515);
    // Add a connection point
    Shape.AddConnectionPoint(Point);
    // Save changes
    (Wsp As IMetabaseObject).Save;
End Sub UserProc;

After executing the example a connection point with set coordinates is added to 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.Drawing;
Imports Prognoz.Platform.Interop.Andy;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    wsp: IWxWorkspace;
    Shape: IWxShape;
    Point: GxPointF;
Begin
    // Get workspace for editing
    mb := Params.Metabase;
    wsp := mb.ItemById["Workspace"].Edit() As IWxWorkspace;
    // Get shape
    Shape := wsp.Shapes.Item[0];
    // Create a point with coordinates
    Point := New GxPointFClass.Create();
    Point.Create(1515);
    // Add a connection point
    Shape.AddConnectionPoint(Point);
    // Save changes
    (Wsp As IMetabaseObject).Save();
    End Sub;

See also:

IWxShape