ConnectionPoints(Index: Integer): IGxPointF;
Index. Index of object connection point.
The ConnectionPoints property returns coordinates for object connection points.
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;
ws: IWxWorkspace;
i: Integer;
X, Y: Double;
Shape: IWxShape;
Begin
MB := MetabaseClass.Active;
// Get workspace
ws := MB.ItemById("WSP").Edit As IWxWorkspace;
Shape := ws.Shapes.Item(0);
For i := 0 To Shape.ConnectionPointsCount - 1 Do
X := Shape.ConnectionPoints(i).X;
Y := Shape.ConnectionPoints(i).Y;
Debug.WriteLine("X " + X.ToString + #10 + #13 + "Y " + Y.ToString);
End For;
// Save changes
(ws As IMetabaseObject).Save;
End Sub UserProc;
When executing the example there will be several messages returned, containing coordinates of object connection points.
See also: