MoveConnectionPoint(Index: Integer; Point: IGxPointF);
Index. Index of object connection point
Point. The point, to which object connection point must be placed..
The MoveConnectionPoint method moves object connection point to the specified point.
To get the number of object connection points, use the IWxShape.ConnectionPointCount property.
Executing the example requires that repository contains a workspace with the WSP identifier containing several connected 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 edit
mb := MetabaseClass.Active;
wsp := mb.ItemById("Workspace").Edit As IWxWorkspace;
// Get shape
Shape := wsp.Shapes.Item(0);
// Create a point with new coordinates
Point := New GxPointF.Create(100, 100);
// Assign the specified coordinates to the last added point provided that the number of points is not equal to 0
If Shape.ConnectionPointsCount <> 0 Then
Shape.MoveConnectionPoint(Shape.ConnectionPointsCount - 1, Point);
End If;
//Save changes
(Wsp As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the shape connection point is moved to the point with specified coordinates.
See also: