IMsCalculationChainEntry.Description

Fore Syntax

Description: String;

Fore.NET Syntax

Description: string;

Description

The Description property determines description of the calculation chain element.

Comments

To get element name, use the IMsCalculationChainEntry.Name property.

Fore Example

Executing the example requires a modeling container with the MS identifier containing a metamodel with the METAMODEL_CONVERT identifier.

Add links to the Metabase, Ms system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    MsKey: Integer;
    Meta: IMsMetaModel;
    CalcChain: IMsCalculationChainEntries;
    i: Integer;
    Entry: IMsCalculationChainEntry;
Begin
    mb := MetabaseClass.Active;
    MsKey := mb.GetObjectKeyById("MS");
    Meta := mb.ItemByIdNamespace("METAMODEL_CONVERT", MsKey).Edit As IMsMetaModel;
    CalcChain := Meta.CalculationChain;
    For i := 0 To CalcChain.Count - 1 Do
        Entry := CalcChain.Item(i);
        Entry.Description := Entry.Name + " (" + Entry.Key.ToString + ")";
        Debug.WriteLine(Entry.Description);
    End For;
    (Meta As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the description including element name and key is generated for all metamodel calculation chain elements. Generated descriptions are displayed in the console window.

Fore.NET Example

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

Imports Prognoz.Platform.Interop.Ms;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    MsKey: uinteger;
    Meta: IMsMetaModel;
    CalcChain: IMsCalculationChainEntries;
    i: Integer;
    Entry: IMsCalculationChainEntry;
Begin
    mb := Params.Metabase;
    MsKey := mb.GetObjectKeyById("MS");
    Meta := mb.ItemByIdNamespace["METAMODEL_CONVERT", MsKey].Edit() As IMsMetaModel;
    CalcChain := Meta.CalculationChain;
    For i := 0 To CalcChain.Count - 1 Do
        Entry := CalcChain.Item[i];
        Entry.Description := Entry.Name + " (" + Entry.Key.ToString() + ")";
        System.Diagnostics.Debug.WriteLine(Entry.Description);
    End For;
    (Meta As IMetabaseObject).Save();
End Sub;

See also:

IMsCalculationChainEntry