IWxRegulargon.NumberOfSides

Syntax

NumberOfSides: Integer;

NumberOfSides: integer;

Description

The NumberOfSides property determines the number of polygon sides.

Example

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

Add links to the Andy, Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    wsp: IWxWorkspace;
    Reg: IWxRegulargon;
    Shape: IWxShape;
Begin
    
// Get repository
    mb := MetabaseClass.Active;
    wsp := mb.ItemById(
"WSP").Edit As IWxWorkspace;
    
Reg := wsp.Shapes.Item(0As IWxRegulargon;
    Reg.NumberOfSides := 
5;
    (wsp 
As IMetabaseObject).Save;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Andy;
 
Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    wsp: IWxWorkspace;
    Reg: IWxRegulargon;
    Shape: IWxShape;
Begin
    
// Get repository
    mb := Params.Metabase;
    wsp := mb.ItemById[
"WSP"].Edit() As IWxWorkspace;
    
Reg := wsp.Shapes.Item[0] As IWxRegulargon;
    Reg.NumberOfSides := 5;
    (wsp 
As IMetabaseObject).Save();
End Sub;

After executing the example a polygon is converted into a pentagon.

See also:

IWxRegulargon