IWxWorkspace.CreateRoundedRectangle

Syntax

CreateRoundedRectangle: IWxRoundedRectangle;

CreateRoundedRectangle: Prognoz.Platform.Interop.Andy.IWxRoundedRectangle;

Description

The CreateRoundedRectangle method creates a rounded rectangle.

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;
    wsp: IWxWorkspace;
    Rec: IWxRoundedRectangle;
Begin
    // Get workspace
    mb := MetabaseClass.Active;
    wsp := mb.ItemById("WSP").Edit As IWxWorkspace;
    // Get shape
    Rec := wsp.CreateRoundedRectangle;
    Rec.Id := "Rectangle1";
    Rec.PinPosition := New GxPointF.Create(12.3,-2);
    Rec.RoundingOffset := 9;
    Rec.Text := "Shape";
    //Save changes
    (Wsp 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;
    wsp: IWxWorkspace;
    Rec: IWxRoundedRectangle;
Begin
    
// Get workspace
    mb := Params.Metabase;
    wsp := mb.ItemById[
"WSP"].Edit() As IWxWorkspace;
    
// Get shape
    Rec := wsp.CreateRoundedRectangle();
    Rec.Id := 
"Rectangle1";
    Rec.PinPosition.Create(
12.3,-2);
    Rec.RoundingOffset := 
9;
    Rec.Text := 
"Shape";
    
//Save changes
    (Wsp As IMetabaseObject).Save();
End Sub;

After executing the example a rounded rectangle is created.

See also:

IWxWorkspace