IDynamicInstance.CreateBlocks

Fore Syntax

CreateBlocks: IDimBlocks

Fore.NET Syntax

CreateBlocks(): Prognoz.Platform.Interop.Dimensions.IDimBlocks;

Description

The CreateBlocks method returns collection of dictionary blocks.

Fore Example

Executing the example requires that the repository contains MDM table dictionary with set dynamic loading of elements and with the DYNDIM identifier.

Add links to the Dimensions and Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Dim: IDynamicInstance;
    Blocks: IDimBlocks;
Begin
    MB := MetabaseClass.Active;
    Dim := MB.ItemById("DYNDIM").Open(NullAs IDynamicInstance;
    // Get collection of dictionary blocks
    Blocks := Dim.CreateBlocks;
    // Display collection size
    Debug.WriteLine("Blocks in dictionary: " + Blocks.Count.ToString);
End Sub UserProc;

After executing the example the console displays size of dictionary blocks collection.

Fore.NET Example

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

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Dimensions;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Dim: IDynamicInstance;
    Blocks: IDimBlocks;
Begin
    MB := Params.Metabase;
    Dim := MB.ItemById["DYNDIM"].Open(NullAs IDynamicInstance;
    // Get collection of dictionary blocks
    Blocks := Dim.CreateBlocks();
    // Display size of blocks collection
    System.Diagnostics.Debug.WriteLine("Blocks in dictionary: " + Blocks.Count);
End Sub;

See also:

IDynamicInstance