IWxWorkspace.StickyShapes

Syntax

StickyShapes: Boolean;

Description

The StickyShapes property determines whether objects can be connected by connecting points.

Comments

The property is developed to be used in regular report. The property value is not saved.

Available values:

Example

Executing the example requires that repository contains regular report with the REPORT_STICKYSHAPES identifier containing only two shapes ion the active sheet.

Add links to the Andy, Drawing, Metabase, Report, Tab system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    Report: IPrxReport;
    Tab: ITabSheet;
    Objects: ITabObjects;
    Shape1, Shape2, Link: IWxShape;
    WSP: IWxWorkspace;
    PrxShape: IPrxShape;
    Placement: IGxRectF;
Begin
    // Get current repository
    mb := MetabaseClass.Active;
    // Get regular report
    Report := mb.ItemById("REPORT_STICKYSHAPES").Edit As IPrxReport;
    // Get report active sheet
    Tab := (Report.ActiveSheet As IPrxTable).TabSheet;
    // Get collection of report objects
    Objects := Tab.Objects;
    // Get the first object
    Shape1 := (Objects.Item(0As IPrxShape) As IWxShape;
    // Get workspace to which the object is belonging
    WSP := Shape1.Workspace;
    // Enable object fixation by connecting points
    WSP.StickyShapes := True;
    // Get the second object
    Shape2 := (Objects.Item(1As IPrxShape) As IWxShape;
    // Create line
    Placement := New GxRectF.Create(20205050);
    PrxShape := Objects.Add("PrxShape", Placement) As IPrxShape;
    PrxShape.Type := PrxShapeType.StraightLink;
    Link := PrxShape As IWxShape;
    // Connect two objects using the line
    WSP.GlueConnectionPoints(Shape1, 1, Link, 0);
    WSP.GlueConnectionPoints(Shape2, 0, Link, 1);
    // Save report
    (Report As IMetabaseObject).Save;
End Sub UserProc;

After executing the example two shapes are connected with connecting line by connecting points in regular report.

See also:

IWxWorkspace