ICalendarDimension.RemoveAttribute

Fore Syntax

RemoveAttribute(AttrNumber: Integer);

Fore.NET Syntax

RemoveAttribute(AttrNumber: integer);

Parameters

AttrNumber - attribute number on dictionary creation.

Description

The RemoveAttribute method removes a standard attribute from the list of attributes used when calendar dictionary is created.

Comments

Unlike the AddAttribute method, this method operates with a through number of standard attribute used to create calendar dictionary.

Fore Example

Executing the example assumes that the repository contains a calendar dictionary with the CALENDAR_DIM identifier.

Add links to the Metabase and Dimensions system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    CalDim: ICalendarDimension;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById(
"CALENDAR_DIM").Edit;
    CalDim := MObj 
As ICalendarDimension;
    CalDim.RemoveAttribute(CalDim.AttributeCount - 1);
    MObj.Save;
End Sub UserProc;

After executing the example the last attribute displayed at dictionary creation is removed from the calendar dictionary.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore Example.

Imports Prognoz.Platform.Interop.Dimensions;

    [STAThread]
Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    CalDim: ICalendarDimension;
Begin
    MB := Params.Metabase;
    MObj := MB.ItemById["CALENDAR_DIM"].Edit();
    CalDim := MObj As ICalendarDimension;
    CalDim.RemoveAttribute(CalDim.AttributeCount - 1);
    MObj.Save();
End Sub;

See also:

ICalendarDimension