AddConnectionPoint(Point: IGxPointF): Integer;
Point. Object connection point.
The AddConnectionPoint method adds an object connection point.
The coordinates passed by the user are automatically corrected to fit the border of IWxShape.
Executing the example requires that repository contains a workspace with the WSP identifier containing shape.
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("WSP").Edit As IWxWorkspace;
// Get shape
Shape := wsp.Shapes.Item(0);
// Create point with coordinates
Point := New GxPointF.Create(15, 15);
// 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.
See also: