IWxWorkspace.CreateArrow

Syntax

CreateArrow: IWxArrow;

CreateArrow(): Prognoz.Platform.Interop.Andy.IWxArrow;

Description

The CreateArrow method creates a figured arrow.

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;
    Arrow: IWxArrow;
Begin
    
// Get workspace for editing
    mb := MetabaseClass.Active;
    ws := mb.ItemById(
"WSP").Edit As IWxWorkspace;
    
// Connect the second shape with the first one
    Arrow := ws.CreateArrow;
    Arrow.FirstPoint := 
New GxPointF.Create(12);
    Arrow.LastPoint := 
New GxPointF.Create(319);
    Arrow.Angle := 
10;
    Arrow.HeightOffset := 
5;
    Arrow.WidthOffset := 
12;
    (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;
    Arrow: IWxArrow;
Begin
    
// Get workspace for editing
    mb := Params.Metabase;
    ws := mb.ItemById[
"WSP"].Edit() As IWxWorkspace;
    
// Connect the second shape with the first one
    Arrow := ws.CreateArrow();
    Arrow.FirstPoint.Create(
12);
    Arrow.LastPoint.Create(
319);
    
Arrow.Angle := 10;
    Arrow.HeightOffset := 
5;
    Arrow.WidthOffset := 
12;

    (ws 
As IMetabaseObject).Save();
End Sub;

After executing the example a figured arrow is created.

See also:

IWxWorkspace