IWxWorkspace.CreateBoxArrow

Syntax

CreateBoxArrow: IWxBoxArrow;

CreateBoxArrow(): Prognoz.Platform.Interop.Andy.IWxBoxArrow;

Description

The CreateBoxArrow method creates an arrow callout.

Example

Executing the example requires that repository contains a workspace with the WSP identifier.

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

Sub UserProc;
Var
    mb: IMetabase;
    ws: IWxWorkspace;
    BArrow: IWxBoxArrow;
    Style: IWxStyle;
Begin
    // Get workspace for editing
    mb := MetabaseClass.Active;
    ws := mb.ItemById("WSP").Edit As IWxWorkspace;
    BArrow := ws.CreateBoxArrow;
    BArrow.Id := "BoxArrow1";
    BArrow.ArrowHeightOffset := 3;
    BArrow.ArrowWidthOffset := 25;
    BArrow.Angle := 40;
    Style := ws.CreateStyle;
    Style.BackgroundBrushForeColor := GxColor.FromName("Red");
    Style.ShadowBrushForeColor := New GxColor.CreateRGB(0129255);
    Style.ShadowBrushBackColor := New GxColor.CreateRGB(25587192);
    Style.ShadowBrushPattern := GxBrushPattern.Diagonals;
    BArrow.Style := Style;
    (ws As IMetabaseObject).Save;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Andy;
Imports Prognoz.Platform.Interop.Drawing;

 
Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    ws: IWxWorkspace;
    BArrow: IWxBoxArrow;
    Style: IWxStyle;
    GxColor: GxColorClassClass = 
New GxColorClassClass();
    Color: GxColorClass_2 = 
New GxColorClass_2();
Begin
    
// Get workspace for editing
    mb := Params.Metabase;
    ws := mb.ItemById[
"WSP"].Edit() As IWxWorkspace;
    
//
    BArrow := ws.CreateBoxArrow();
    BArrow.Id := 
"BoxArrow1";
    BArrow.ArrowHeightOffset := 
3;
    BArrow.ArrowWidthOffset := 
25;
    BArrow.Angle := 
40;
    Style := ws.CreateStyle();
    Style.BackgroundBrushForeColor := GxColor.FromName(
"Red");
    Color.CreateRGB(
0129255);
    Style.ShadowBrushForeColor := Color;
    Color.CreateRGB(
25587192);
    Style.ShadowBrushBackColor := Color;
    Style.ShadowBrushPattern := GxBrushPattern.wbpDiagonals;
    BArrow.Style := Style;
    (ws 
As IMetabaseObject).Save();
End Sub;

After executing the example an arrow callout is created in a workspace, and a specific formatting style is created for this callout.

See also:

IWxWorkspace